Debian Codegraph @

.cargo/vendor/ryu/.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]
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: cargo test
38 - run: cargo test --features small
39 - run: cargo build --tests --features no-panic --release
40 if: matrix.rust == 'nightly'
41
42 msrv:
43 name: Rust 1.36.0
44 needs: pre_ci
45 if: needs.pre_ci.outputs.continue
46 runs-on: ubuntu-latest
47 timeout-minutes: 45
48 steps:
49 - uses: actions/checkout@v4
50 - uses: dtolnay/[email protected]
51 - run: cargo build
52 - run: cargo build --features small
53
54 doc:
55 name: Documentation
56 needs: pre_ci
57 if: needs.pre_ci.outputs.continue
58 runs-on: ubuntu-latest
59 timeout-minutes: 45
60 env:
61 RUSTDOCFLAGS: -Dwarnings
62 steps:
63 - uses: actions/checkout@v4
64 - uses: dtolnay/rust-toolchain@nightly
65 - uses: dtolnay/install@cargo-docs-rs
66 - run: cargo docs-rs
67
68 miri:
69 name: Miri
70 needs: pre_ci
71 if: needs.pre_ci.outputs.continue
72 runs-on: ubuntu-latest
73 timeout-minutes: 45
74 steps:
75 - uses: actions/checkout@v4
76 - uses: dtolnay/rust-toolchain@miri
77 - run: cargo miri setup
78 - run: cargo miri test
79 env:
80 MIRIFLAGS: -Zmiri-strict-provenance
81
82 clippy:
83 name: Clippy
84 runs-on: ubuntu-latest
85 if: github.event_name != 'pull_request'
86 timeout-minutes: 45
87 steps:
88 - uses: actions/checkout@v4
89 - uses: dtolnay/rust-toolchain@clippy
90 - run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic
91
92 outdated:
93 name: Outdated
94 runs-on: ubuntu-latest
95 if: github.event_name != 'pull_request'
96 timeout-minutes: 45
97 steps:
98 - uses: actions/checkout@v4
99 - uses: dtolnay/install@cargo-outdated
100 - run: cargo outdated --workspace --exit-code 1
101 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
102
103 fuzz:
104 name: Fuzz
105 needs: pre_ci
106 if: needs.pre_ci.outputs.continue
107 runs-on: ubuntu-latest
108 timeout-minutes: 45
109 steps:
110 - uses: actions/checkout@v4
111 - uses: dtolnay/rust-toolchain@nightly
112 - uses: dtolnay/install@cargo-fuzz
113 - run: cargo fuzz check