Debian Codegraph @

.cargo/vendor/pastey/.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 - name: Enable type layout randomization
35 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
36 if: matrix.rust == 'nightly'
37 - run: ./test.sh ${{matrix.rust}}
38 - uses: actions/upload-artifact@v4
39 if: matrix.rust == 'nightly' && always()
40 with:
41 name: Cargo.lock
42 path: Cargo.lock
43
44 msrv:
45 name: Rust 1.54
46 needs: pre_ci
47 if: needs.pre_ci.outputs.continue
48 runs-on: ubuntu-latest
49 timeout-minutes: 45
50 steps:
51 - uses: actions/checkout@v4
52 - uses: dtolnay/[email protected]
53 - run: cargo check
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 - uses: dtolnay/install@cargo-docs-rs
67 - run: cargo docs-rs
68
69 clippy:
70 name: Clippy
71 runs-on: ubuntu-latest
72 if: github.event_name != 'pull_request'
73 timeout-minutes: 45
74 steps:
75 - uses: actions/checkout@v4
76 - uses: dtolnay/rust-toolchain@clippy
77 - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
78
79 miri:
80 name: Miri
81 needs: pre_ci
82 if: needs.pre_ci.outputs.continue
83 runs-on: ubuntu-latest
84 timeout-minutes: 45
85 env:
86 MIRIFLAGS: -Zmiri-strict-provenance
87 steps:
88 - uses: actions/checkout@v4
89 - uses: dtolnay/rust-toolchain@miri
90 - run: cd ./pastey-test-suite && cargo miri setup && cargo miri test && cd ../
91 - run: cd ./paste-compat && cargo miri setup && cargo miri test && cd ../
92
93 outdated:
94 name: Outdated
95 runs-on: ubuntu-latest
96 if: github.event_name != 'pull_request'
97 timeout-minutes: 45
98 steps:
99 - uses: actions/checkout@v4
100 - uses: dtolnay/rust-toolchain@stable
101 - uses: dtolnay/install@cargo-outdated
102 - run: cargo outdated --workspace --exit-code 1