2022-11-20 23:00:58 +01:00
|
|
|
pipeline:
|
2022-11-29 18:46:34 +01:00
|
|
|
build:
|
2022-11-30 00:53:23 +01:00
|
|
|
image: rust:1-bullseye
|
2022-11-29 18:46:34 +01:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
commands:
|
|
|
|
- cargo build --release
|
|
|
|
buildlinuxaarch64:
|
2022-11-30 00:53:23 +01:00
|
|
|
image: rust:1-bullseye
|
2022-11-29 18:46:34 +01:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
commands:
|
2022-12-02 14:38:40 +01:00
|
|
|
- export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
|
2022-12-01 17:17:36 +01:00
|
|
|
- apt-get update && apt-get install -y gcc-aarch64-linux-gnu
|
2022-11-29 18:46:34 +01:00
|
|
|
- rustup target add aarch64-unknown-linux-gnu
|
2022-11-29 19:14:24 +01:00
|
|
|
- cargo build --release --target aarch64-unknown-linux-gnu
|
2022-11-30 00:37:38 +01:00
|
|
|
buildwinamd64:
|
2022-11-30 00:53:23 +01:00
|
|
|
image: rust:1-bullseye
|
2022-11-30 00:37:38 +01:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
commands:
|
2022-12-01 17:17:36 +01:00
|
|
|
- apt-get update && apt-get install -y gcc-mingw-w64
|
2022-11-30 00:37:38 +01:00
|
|
|
- rustup target add x86_64-pc-windows-gnu
|
|
|
|
- cargo build --release --target x86_64-pc-windows-gnu
|
2022-11-21 00:05:52 +01:00
|
|
|
release:
|
2022-11-30 00:53:23 +01:00
|
|
|
image: rust:1-bullseye
|
2022-11-21 00:05:52 +01:00
|
|
|
when:
|
|
|
|
event: tag
|
2022-11-29 18:46:34 +01:00
|
|
|
secrets: [ gitea_api_key ]
|
2022-11-20 23:00:58 +01:00
|
|
|
commands:
|
2022-12-02 15:11:49 +01:00
|
|
|
- curl --user guillem:$GITEA_API_KEY --upload-file target/release/dr https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-linux-amd64/dr
|
|
|
|
- curl --user guillem:$GITEA_API_KEY --upload-file target/aarch64-unknown-linux-gnu/release/dr https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-linux-aarch64/dr
|
2022-12-02 19:44:19 +01:00
|
|
|
- curl --user guillem:$GITEA_API_KEY --upload-file target/x86_64-pc-windows-gnu/release/dr.exe https://git.guillemborrell.es/api/packages/guillem/generic/dr/$CI_COMMIT_TAG-win-amd64/dr.exe
|
2022-11-29 18:46:34 +01:00
|
|
|
publish:
|
2022-11-30 00:53:23 +01:00
|
|
|
image: rust:1-bullseye
|
2022-11-29 18:46:34 +01:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
secrets: [ cargo_registry_token ]
|
|
|
|
commands:
|
2022-11-21 00:26:22 +01:00
|
|
|
- cargo publish --token $CARGO_REGISTRY_TOKEN
|