Debian Codegraph @

debian/rust-vendor/rustversion/.github/workflows/ci.yml

raw
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.85.0]
28 timeout-minutes: 45
29 steps:
30 - uses: actions/checkout@v7
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 - name: RUSTFLAGS=-Zfmt-debug=none cargo test
39 run: RUSTFLAGS=${RUSTFLAGS}\ -Zfmt-debug=none cargo test
40 if: matrix.rust == 'nightly'
41 - uses: actions/upload-artifact@v7
42 if: matrix.rust == 'nightly' && always()
43 with:
44 name: Cargo.lock
45 path: Cargo.lock
46 continue-on-error: true
47
48 windows:
49 name: Windows
50 needs: pre_ci
51 if: needs.pre_ci.outputs.continue
52 runs-on: windows-latest
53 timeout-minutes: 45
54 steps:
55 - uses: actions/checkout@v7
56 - uses: dtolnay/rust-toolchain@stable
57 - run: cargo test
58
59 msrv:
60 name: Rust 1.31.0
61 needs: pre_ci
62 if: needs.pre_ci.outputs.continue
63 runs-on: ubuntu-latest
64 timeout-minutes: 45
65 steps:
66 - uses: actions/checkout@v7
67 - uses: dtolnay/[email protected]
68 - run: cargo check
69
70 doc:
71 name: Documentation
72 needs: pre_ci
73 if: needs.pre_ci.outputs.continue
74 runs-on: ubuntu-latest
75 timeout-minutes: 45
76 env:
77 RUSTDOCFLAGS: -Dwarnings
78 steps:
79 - uses: actions/checkout@v7
80 - uses: dtolnay/rust-toolchain@nightly
81 - uses: dtolnay/install@cargo-docs-rs
82 - run: cargo docs-rs
83
84 clippy:
85 name: Clippy
86 runs-on: ubuntu-latest
87 if: github.event_name != 'pull_request'
88 timeout-minutes: 45
89 steps:
90 - uses: actions/checkout@v7
91 - uses: dtolnay/rust-toolchain@clippy
92 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
93
94 miri:
95 name: Miri
96 needs: pre_ci
97 if: needs.pre_ci.outputs.continue
98 runs-on: ubuntu-latest
99 timeout-minutes: 45
100 steps:
101 - uses: actions/checkout@v7
102 - uses: dtolnay/rust-toolchain@miri
103 - run: cargo miri setup
104 - run: cargo miri test
105 env:
106 MIRIFLAGS: -Zmiri-strict-provenance
107
108 outdated:
109 name: Outdated
110 runs-on: ubuntu-latest
111 if: github.event_name != 'pull_request'
112 timeout-minutes: 45
113 steps:
114 - uses: actions/checkout@v7
115 - uses: dtolnay/rust-toolchain@stable
116 - uses: dtolnay/install@cargo-outdated
117 - run: cargo outdated --workspace --exit-code 1