blob: 76ee51795a084f95ffc99851fa98063b749bcb15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# The documentation for the contents of this file can be found at:
# https://docs.gitlab.com/ce/ci/yaml/README.html
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/rust/tags/
# The recipe for this docker image can be found at:
# https://github.com/rust-lang/docker-rust/blob/e7703b2cf525f2525bdf8d131cd66b5b38b1513c/1.31.0/stretch/Dockerfile
image: "rust:1.31.0"
build-test:cargo:
script:
- apt-get update
- apt-get install --assume-yes libudev-dev libhidapi-dev
- rustc --version && cargo --version
- cd nitrocli
- cargo build --all --verbose
- cargo test --all --verbose
lint:clippy:
script:
- rustup component add clippy
# First check and build everything but be very permissive. Then clean
# only the nitrocli package artifacts. Lastly check once more, but
# with warnings turned to errors. This last run will only recheck
# nitrocli (everything else is still up-to-date). That procedure is
# necessary because consumed dependencies may emit errors otherwise.
- cd nitrocli
- cargo clippy --all-targets --all-features -- -A clippy::all
- cargo clean --package=nitrocli
- cargo clippy --all-targets --all-features -- -D warnings
format:rustfmt:
script:
- rustup component add rustfmt
- cd nitrocli
- cargo fmt --all -- --check
|