2023-04-27 20:55:24 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
steps:
|
2023-04-27 23:11:21 +00:00
|
|
|
- name: build-x86_64-unknown-linux-gnu
|
2023-04-27 20:55:24 +00:00
|
|
|
image: rust:latest
|
|
|
|
env:
|
|
|
|
- CARGO_TARGET_DIR=/var/cache/drone/cargo
|
|
|
|
- CARGO_HOME=/var/cache/drone/cargo
|
|
|
|
commands:
|
|
|
|
- apt-get update
|
2023-04-27 21:17:40 +00:00
|
|
|
- apt-get install -y gcc-x86-64-linux-gnu binutils-x86-64-linux-gnu
|
2023-04-27 20:55:24 +00:00
|
|
|
- rustup target add x86_64-unknown-linux-gnu
|
|
|
|
- cargo build --target=x86_64-unknown-linux-gnu --release -j2 --config target.x86_64-unknown-linux-gnu.linker=\"x86_64-linux-gnu-gcc\"
|
2023-04-27 21:17:40 +00:00
|
|
|
- x86_64-linux-gnu-strip target/x86_64-unknown-linux-gnu/release/empede
|
2023-04-27 20:55:24 +00:00
|
|
|
|
2023-04-27 23:11:21 +00:00
|
|
|
- name: build-aarch64-unknown-linux-gnu
|
|
|
|
image: rust:latest
|
|
|
|
env:
|
|
|
|
- CARGO_TARGET_DIR=/var/cache/drone/cargo
|
|
|
|
- CARGO_HOME=/var/cache/drone/cargo
|
|
|
|
commands:
|
|
|
|
- cargo build --release -j2
|
|
|
|
- strip target/release/empede
|
|
|
|
|
2023-04-27 20:55:24 +00:00
|
|
|
- name: package
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- apk add --no-cache tar gzip
|
2023-04-27 23:11:21 +00:00
|
|
|
|
2023-04-27 20:55:24 +00:00
|
|
|
- mkdir empede-x86_64-unknown-linux-gnu
|
|
|
|
- cp -r target/x86_64-unknown-linux-gnu/release/empede static/ README.md empede-x86_64-unknown-linux-gnu
|
|
|
|
- tar czf empede-x86_64-unknown-linux-gnu.tar.gz empede-x86_64-unknown-linux-gnu/
|
2023-04-27 23:11:21 +00:00
|
|
|
|
|
|
|
- mkdir empede-aarch64-unknown-linux-gnu
|
|
|
|
- cp -r target/release/empede static/ README.md empede-aarch64-unknown-linux-gnu
|
|
|
|
- tar czf empede-aarch64-unknown-linux-gnu.tar.gz empede-aarch64-unknown-linux-gnu/
|
2023-04-27 20:55:24 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
|
|
|
- name: gitea_release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: GITEA_TOKEN
|
|
|
|
base_url: https://git.sijman.nl
|
|
|
|
files:
|
|
|
|
- empede-x86_64-unknown-linux-gnu.tar.gz
|
2023-04-27 23:11:21 +00:00
|
|
|
- empede-aarch64-unknown-linux-gnu.tar.gz
|
2023-04-27 20:55:24 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
2023-04-27 23:11:21 +00:00
|
|
|
|
|
|
|
|