-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (98 loc) · 3.21 KB
/
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "17 3 * * *"
jobs:
expect:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.81.0", "stable", "beta", "nightly"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
# Run two tests to ensure that the output is consistent
- name: Run cargo check simple comparison
run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-supported-simple.out"
- name: Run cargo check submod comparison
run: ./tests/compare-output.sh "check --all-features --test submod" "tests/check-expect-supported-submod.out"
- name: cargo clean
run: cargo clean
- name: Run cargo clippy simple comparison
run: ./tests/compare-output.sh "clippy --all-features --test simple" "tests/clippy-expect-supported-simple.out"
- name: Run cargo clippy submod comparison
run: ./tests/compare-output.sh "clippy --all-features --test submod" "tests/clippy-expect-supported-submod.out"
- name: cargo clean
run: cargo clean
- name: cargo test
run: cargo test --all-targets
allow-check:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.43.0", "1.80.0"]
env:
RUSTFLAGS: "-D warnings"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: cargo check
run: cargo check --all-targets --all-features
- name: cargo clean
run: cargo clean
- name: cargo test
run: cargo test --all-targets --all-features
allow-clippy:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.64.0", "1.80.0"] # clippy+rustversion only works with clippy >= 1.64.0
env:
RUSTFLAGS: "-D warnings"
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy
- name: cargo check
run: cargo check --all-targets --all-features
- name: cargo clean
run: cargo clean
- name: cargo clippy
run: cargo clippy --all-targets --all-features
- name: cargo clean
run: cargo clean
- name: cargo test
run: cargo test --all-targets --all-features
ignore-check:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ["1.38.0", "1.42.0"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Run cargo check simple comparison
run: ./tests/compare-output.sh "check --all-features --test simple" "tests/check-expect-ignored-simple.out"
- name: cargo clean
run: cargo clean
- name: cargo test -- simple
run: cargo test -- simple