diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9126f09..f9a6bb9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,15 @@ image: "rust:latest" -variables: - # move cargo data into the project directory so it can be cached - CARGO_HOME: ${CI_PROJECT_DIR}/.cargo - # treat compiler warnings as errors (in clippy, when running tests, etc.) - RUSTFLAGS: -Dwarnings - -default: - # cancel the job if a newer pipeline starts for the same MR or branch - interruptible: true - cache: - # use the git branch or tag as cache key, so the cache will be - # shared among CI runs for the same branch or tag - key: ${CI_COMMIT_REF_SLUG} - # we cache .cargo/ and target/, which effectively enables - # incremental builds across different executions of the CI - # for the same branch or the same merge request - paths: - - .cargo - - target - -# a format check is run in parallel with the rest -cargo:fmt: +build-job: + stage: build + image: ubuntu:22.04 + needs: + - job: tests-job + - job: prepare-job + artifacts: true script: - - rustup component add rustfmt - - cargo fmt --check + - echo "======== BUILD JOB ========" + - cargo build --release + artifacts: + paths: + - target/release/nyxi-installer