stages: [build, release] image: 'themackabu/rust:zigbuild-1.75.0' variables: VERSION: '1.6.4' before_script: - mkdir binary - apt-get update -yqq - apt-get install -yqq zip clang llvm - export CC="/usr/bin/clang" - export CXX="/usr/bin/clang++" build_linux_arm64: stage: build tags: [fedora] only: [/^v\d+\.\d+\.\d+.*$/] script: - cargo zigbuild -r --color always - zip binary/pmc_${VERSION}_linux_amd64.zip target/release/pmc artifacts: paths: [/binary] build_linux_amd64: stage: build tags: [fedora] only: [/^v\d+\.\d+\.\d+.*$/] script: - cargo zigbuild -r --target x86_64-unknown-linux-gnu --color always - zip binary/pmc_${VERSION}_linux_amd64.zip target/x86_64-unknown-linux-gnu/release/pmc artifacts: paths: [/binary] build_darwin_amd64: stage: build tags: [fedora] only: [/^v\d+\.\d+\.\d+.*$/] script: - cargo zigbuild -r --target x86_64-apple-darwin --color always - zip binary/pmc_${VERSION}_darwin_amd64.zip target/x86_64-apple-darwin/release/pmc artifacts: paths: [/binary] build_darwin_arm: stage: build tags: [fedora] only: [/^v\d+\.\d+\.\d+.*$/] script: - cargo zigbuild -r --target aarch64-apple-darwin --color always - zip binary/pmc_${VERSION}_darwin_arm.zip target/aarch64-apple-darwin/release/pmc artifacts: paths: [/binary] release: stage: release image: registry.gitlab.com/gitlab-org/release-cli:latest rules: - if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+.*$/' script: - echo "running release_job for $TAG" release: name: '$CI_COMMIT_TAG' tag_name: '$CI_COMMIT_TAG' description: 'v0.$CI_PIPELINE_IID'