Skip to content
Snippets Groups Projects
Verified Commit 38e9eeaa authored by Geoffrey Arthaud's avatar Geoffrey Arthaud
Browse files

Refactor .gitlab-ci.yml for releases

parent 4a58ab08
Branches
No related tags found
No related merge requests found
...@@ -28,55 +28,46 @@ test-rust-nightly: ...@@ -28,55 +28,46 @@ test-rust-nightly:
tags: tags:
- buildonly - buildonly
release-linux: .rust-release:
stage: release stage: release
image: rust:latest
variables: variables:
TARGET: target/x86_64-unknown-linux-musl/release/gitlab-project-doctor TARGET: target/$TARGET_ARCH/release/gitlab-project-doctor
script: script:
- apt update -y - rustup target add $TARGET_ARCH
- apt install -y musl-dev musl-tools build-essential - cargo build --target $TARGET_ARCH --release
- rustup target add x86_64-unknown-linux-musl
- cargo build --target x86_64-unknown-linux-musl --release
- strip $TARGET - strip $TARGET
- ldd $TARGET - $LDD_CMD $TARGET
- $TARGET --help - $TARGET --help
artifacts: artifacts:
paths: paths:
- $TARGET - $TARGET
release-linux:
extends: .rust-release
image: rust:latest
variables:
TARGET_ARCH: x86_64-unknown-linux-musl
LDD_CMD: ldd
before_script:
- apt update -y
- apt install -y musl-dev musl-tools build-essential
tags: tags:
- buildonly - buildonly
release-macos-silicon: release-macos-silicon:
stage: release extends: .rust-release
variables: variables:
TARGET: target/aarch64-apple-darwin/release/gitlab-project-doctor TARGET_ARCH: aarch64-apple-darwin
script: LDD_CMD: otool -L
- rustup target add aarch64-apple-darwin
- cargo build --target aarch64-apple-darwin --release
- strip $TARGET
- otool -L $TARGET
- $TARGET --help
artifacts:
paths:
- $TARGET
tags: tags:
- macos_mx - macos_mx
retry: 1 retry: 1 # First-time OpenSSL build will fail rust build
release-macos-x86: release-macos-x86:
stage: release extends: .rust-release
variables: variables:
TARGET: target/x86_64-apple-darwin/release/gitlab-project-doctor TARGET_ARCH: x86_64-apple-darwin
script: LDD_CMD: otool -L
- rustup target add x86_64-apple-darwin
- cargo build --target x86_64-apple-darwin --release
- strip $TARGET
- otool -L $TARGET
- $TARGET --help
artifacts:
paths:
- $TARGET
tags: tags:
- macos_mx - macos_mx
retry: 1 retry: 1 # First-time OpenSSL build will fail rust build
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment