Debian Codegraph @

.cargo/vendor/thiserror-1.0.59/.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.56.0]
28 timeout-minutes: 45
29 steps:
30 - uses: actions/checkout@v4
31 - uses: dtolnay/rust-toolchain@master
32 with:
33 toolchain: ${{matrix.rust}}
34 components: rust-src
35 - name: Enable type layout randomization
36 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
37 if: matrix.rust == 'nightly'
38 - name: Enable nightly-only tests
39 run: echo RUSTFLAGS=${RUSTFLAGS}\ --cfg=thiserror_nightly_testing >> $GITHUB_ENV
40 if: matrix.rust == 'nightly'
41 - run: cargo test --all
42
43 minimal:
44 name: Minimal versions
45 needs: pre_ci
46 if: needs.pre_ci.outputs.continue
47 runs-on: ubuntu-latest
48 timeout-minutes: 45
49 steps:
50 - uses: actions/checkout@v4
51 - uses: dtolnay/rust-toolchain@nightly
52 - run: cargo generate-lockfile -Z minimal-versions
53 - run: cargo check --locked
54
55 doc:
56 name: Documentation
57 needs: pre_ci
58 if: needs.pre_ci.outputs.continue
59 runs-on: ubuntu-latest
60 timeout-minutes: 45
61 env:
62 RUSTDOCFLAGS: -Dwarnings
63 steps:
64 - uses: actions/checkout@v4
65 - uses: dtolnay/rust-toolchain@nightly
66 with:
67 components: rust-src
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@v4
78 - uses: dtolnay/rust-toolchain@nightly
79 with:
80 components: clippy, rust-src
81 - run: cargo clippy --tests --workspace -- -Dclippy::all -Dclippy::pedantic
82
83 miri:
84 name: Miri
85 needs: pre_ci
86 if: needs.pre_ci.outputs.continue
87 runs-on: ubuntu-latest
88 timeout-minutes: 45
89 steps:
90 - uses: actions/checkout@v4
91 - uses: dtolnay/rust-toolchain@miri
92 - run: cargo miri setup
93 - run: cargo miri test
94 env:
95 MIRIFLAGS: -Zmiri-strict-provenance
96
97 outdated:
98 name: Outdated
99 runs-on: ubuntu-latest
100 if: github.event_name != 'pull_request'
101 timeout-minutes: 45
102 steps:
103 - uses: actions/checkout@v4
104 - uses: dtolnay/rust-toolchain@stable
105 - uses: dtolnay/install@cargo-outdated
106 - run: cargo outdated --workspace --exit-code 1