-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.gitlab-ci.yml
69 lines (61 loc) · 1.49 KB
/
.gitlab-ci.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
image: registry.gitlab.com/spwilson2/rust-sccache
.test-template: &test-template
cache:
key: build-cache-$RUST_TOOLCHAIN
paths:
- .cargo/
- .cache/
- target/
before_script:
- export RUST_BACKTRACE=1
- rustup default "$RUST_TOOLCHAIN"
- rustup --version
- rustc --version
- cargo --version
script:
- cargo test --tests --jobs 1
- cargo test --tests --jobs 1 --release
- cargo test --features doctest --doc --jobs 1
- cargo test --features doctest --doc --jobs 1 --release
- cargo test --no-default-features --tests --jobs 1
- cargo test --no-default-features --tests --jobs 1 --release
test-stable:
<<: *test-template
variables:
RUST_TOOLCHAIN: stable
test-beta:
<<: *test-template
variables:
RUST_TOOLCHAIN: beta
test-nightly:
<<: *test-template
variables:
RUST_TOOLCHAIN: nightly
test-coverage:
<<: *test-template
variables:
RUST_TOOLCHAIN: stable
script:
- cargo install cargo-tarpaulin
- cargo tarpaulin --verbose
test-fmt:
<<: *test-template
variables:
RUST_TOOLCHAIN: stable
script:
- rustup component add rustfmt
- cargo fmt --all --verbose -- --check
test-clippy:
<<: *test-template
variables:
RUST_TOOLCHAIN: stable
script:
- rustup component add clippy
- cargo clippy -- -D warnings
- cargo clippy --no-default-features -- -D warnings
test-docs:
<<: *test-template
variables:
RUST_TOOLCHAIN: nightly
script:
- cargo doc --no-deps