Update .gitlab-ci.yml file

This commit is contained in:
Luke Jones
2023-01-16 01:59:50 +00:00
parent 7eab94bc7f
commit bcba11d4ec

View File

@@ -1,19 +1,20 @@
image: rust:latest image: rust:latest
cache: &rust_cache .rust_cache: &rust_cache
# key: $CI_COMMIT_REF_SLUG cache: &rust_cache
paths: # key: $CI_COMMIT_REF_SLUG
# Don't include `incremental` to save space paths:
# Debug # Don't include `incremental` to save space
- target/debug/build/ # Debug
- target/debug/deps/ - target/debug/build/
- target/debug/.fingerprint/ - target/debug/deps/
- target/debug/.cargo-lock - target/debug/.fingerprint/
# Release - target/debug/.cargo-lock
- target/release/build/ # Release
- target/release/deps/ - target/release/build/
- target/release/.fingerprint/ - target/release/deps/
- target/release/.cargo-lock - target/release/.fingerprint/
- target/release/.cargo-lock
before_script: before_script:
- apt-get update -qq && apt-get install -y -qq libudev-dev libgtk-3-dev grep llvm clang libclang-dev - apt-get update -qq && apt-get install -y -qq libudev-dev libgtk-3-dev grep llvm clang libclang-dev
@@ -28,8 +29,7 @@ stages:
format: format:
except: except:
- tags - tags
cache: <<: *rust_cache
<<: *rust_cache
script: script:
- echo "nightly" > rust-toolchain - echo "nightly" > rust-toolchain
- rustup component add rustfmt - rustup component add rustfmt
@@ -38,8 +38,7 @@ format:
check: check:
except: except:
- tags - tags
cache: <<: *rust_cache
<<: *rust_cache
script: script:
- rustup component add clippy - rustup component add clippy
- cargo check - cargo check
@@ -50,16 +49,14 @@ check:
test: test:
except: except:
- tags - tags
cache: <<: *rust_cache
<<: *rust_cache
script: script:
- cargo test - cargo test
release: release:
only: only:
- tags - tags
cache: <<: *rust_cache
<<: *rust_cache
script: script:
- make && make vendor - make && make vendor
artifacts: artifacts:
@@ -71,8 +68,7 @@ pages:
stage: deploy stage: deploy
only: only:
- tags - tags
cache: <<: *rust_cache
<<: *rust_cache
script: script:
- cargo doc --document-private-items --no-deps --workspace - cargo doc --document-private-items --no-deps --workspace
- rm -rf public - rm -rf public