Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: CI
2
3 on:
4 push:
5 pull_request:
6 workflow_dispatch:
7 schedule: [cron: "40 1 * * *"]
8
9 permissions:
10 contents: read
11
12 env:
13 RUSTFLAGS: -Dwarnings
14
15 jobs:
16 pre_ci:
17 uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
18
19 test:
20 name: Rust ${{matrix.rust}}
21 needs: pre_ci
22 if: needs.pre_ci.outputs.continue
23 runs-on: ubuntu-latest
24 strategy:
25 fail-fast: false
26 matrix:
27 rust: [nightly, beta, stable, 1.61.0]
28 timeout-minutes: 45
29 steps:
30 - uses: actions/checkout@v5
31 - uses: dtolnay/rust-toolchain@master
32 with:
33 toolchain: ${{matrix.rust}}
34 - name: Enable type layout randomization
35 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
36 if: matrix.rust == 'nightly'
37 - run: cargo test
38 - uses: actions/upload-artifact@v4
39 if: matrix.rust == 'nightly' && always()
40 with:
41 name: Cargo.lock
42 path: Cargo.lock
43 continue-on-error: true
44
45 minimal:
46 name: Minimal versions
47 needs: pre_ci
48 if: needs.pre_ci.outputs.continue
49 runs-on: ubuntu-latest
50 timeout-minutes: 45
51 steps:
52 - uses: actions/checkout@v5
53 - uses: dtolnay/rust-toolchain@nightly
54 - run: cargo generate-lockfile -Z minimal-versions
55 - run: cargo check --locked
56
57 doc:
58 name: Documentation
59 needs: pre_ci
60 if: needs.pre_ci.outputs.continue
61 runs-on: ubuntu-latest
62 timeout-minutes: 45
63 env:
64 RUSTDOCFLAGS: -Dwarnings
65 steps:
66 - uses: actions/checkout@v5
67 - uses: dtolnay/rust-toolchain@nightly
68 - uses: dtolnay/install@cargo-docs-rs
69 - run: cargo docs-rs
70
71 clippy:
72 name: Clippy
73 runs-on: ubuntu-latest
74 if: github.event_name != 'pull_request'
75 timeout-minutes: 45
76 steps:
77 - uses: actions/checkout@v5
78 - uses: dtolnay/rust-toolchain@clippy
79 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
80
81 miri:
82 name: Miri
83 needs: pre_ci
84 if: needs.pre_ci.outputs.continue
85 runs-on: ubuntu-latest
86 timeout-minutes: 45
87 steps:
88 - uses: actions/checkout@v5
89 - uses: dtolnay/rust-toolchain@miri
90 - run: cargo miri setup
91 - run: cargo miri test
92 env:
93 MIRIFLAGS: -Zmiri-strict-provenance
94
95 outdated:
96 name: Outdated
97 runs-on: ubuntu-latest
98 if: github.event_name != 'pull_request'
99 timeout-minutes: 45
100 steps:
101 - uses: actions/checkout@v5
102 - uses: dtolnay/rust-toolchain@stable
103 - uses: dtolnay/install@cargo-outdated
104 - run: cargo outdated --workspace --exit-code 1