stages: - test - build - upload sast: stage: test rust-latest:debug: stage: build image: rust:latest script: - rustc --version && cargo --version - cargo build --locked rust-nightly:debug: stage: build image: rustlang/rust:nightly script: - rustc --version && cargo --version - cargo build --locked allow_failure: true rust-latest:release:linux: stage: build image: rust:latest artifacts: name: "binary:linux" paths: - target/release/wwise_fix expire_in: 1 week script: - cargo build --release --locked - strip target/release/wwise_fix rust-latest:release:windows: stage: build image: rust:latest artifacts: name: "binary:windows" paths: - target/x86_64-pc-windows-gnu/release/wwise_fix.exe expire_in: 1 week variables: CI_DEBUG_TRACE: "true" before_script: - apt-get update && apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64 - rustup target add x86_64-pc-windows-gnu script: - cargo build --release --target x86_64-pc-windows-gnu --locked - strip target/x86_64-pc-windows-gnu/release/wwise_fix.exe upload:binary:linux: stage: upload needs: ["rust-latest:release:linux"] script: - apt-get update && apt-get install -y --no-install-recommends git curl - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file target/release/wwise_fix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/wwise_fix/$(git describe)/wwise_fix"' upload:binary:windows: stage: upload needs: ["rust-latest:release:windows"] script: - apt-get update && apt-get install -y --no-install-recommends git curl - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file target/x86_64-pc-windows-gnu/release/wwise_fix.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/wwise_fix/$(git describe)/wwise_fix.exe"' include: - template: Security/SAST.gitlab-ci.yml