Files
asusctl/.gitlab-ci.yml
2023-01-16 01:59:50 +00:00

84 lines
1.6 KiB
YAML

image: rust:latest
.rust_cache: &rust_cache
cache: &rust_cache
# key: $CI_COMMIT_REF_SLUG
paths:
# Don't include `incremental` to save space
# Debug
- target/debug/build/
- target/debug/deps/
- target/debug/.fingerprint/
- target/debug/.cargo-lock
# Release
- target/release/build/
- target/release/deps/
- target/release/.fingerprint/
- target/release/.cargo-lock
before_script:
- apt-get update -qq && apt-get install -y -qq libudev-dev libgtk-3-dev grep llvm clang libclang-dev
stages:
- format
- check
- test
- release
- deploy
format:
except:
- tags
<<: *rust_cache
script:
- echo "nightly" > rust-toolchain
- rustup component add rustfmt
- cargo fmt --check
check:
except:
- tags
<<: *rust_cache
script:
- rustup component add clippy
- cargo check
# deny currently catches too much
#- cargo install cargo-deny && cargo deny
- cargo install cargo-cranky && cargo cranky
test:
except:
- tags
<<: *rust_cache
script:
- cargo test
release:
only:
- tags
<<: *rust_cache
script:
- make && make vendor
artifacts:
paths:
- vendor_asusctl_*.tar.xz
- cargo-config
pages:
stage: deploy
only:
- tags
<<: *rust_cache
script:
- cargo doc --document-private-items --no-deps --workspace
- rm -rf public
- mkdir public
- cp -R target/doc/* public
- cp misc/index.html public
artifacts:
paths:
- public
variables:
GIT_SUBMODULE_STRATEGY: normal