Debian Codegraph @

debian/missing-sources/semver/.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 - run: cargo check --no-default-features
39 - run: cargo check --features serde
40 - run: cargo check --no-default-features --features serde
41 - uses: actions/upload-artifact@v4
42 if: matrix.rust == 'nightly' && always()
43 with:
44 name: Cargo.lock
45 path: Cargo.lock
46 continue-on-error: true
47
48 node:
49 name: Node
50 needs: pre_ci
51 if: needs.pre_ci.outputs.continue
52 runs-on: ubuntu-latest
53 timeout-minutes: 45
54 steps:
55 - uses: actions/checkout@v5
56 - uses: dtolnay/rust-toolchain@stable
57 - run: npm install semver
58 - run: cargo test
59 env:
60 RUSTFLAGS: --cfg test_node_semver ${{env.RUSTFLAGS}}
61
62 minimal:
63 name: Minimal versions
64 needs: pre_ci
65 if: needs.pre_ci.outputs.continue
66 runs-on: ubuntu-latest
67 timeout-minutes: 45
68 steps:
69 - uses: actions/checkout@v5
70 - uses: dtolnay/rust-toolchain@nightly
71 - run: cargo generate-lockfile -Z minimal-versions
72 - run: cargo check --locked --features serde
73
74 doc:
75 name: Documentation
76 needs: pre_ci
77 if: needs.pre_ci.outputs.continue
78 runs-on: ubuntu-latest
79 timeout-minutes: 45
80 env:
81 RUSTDOCFLAGS: -Dwarnings
82 steps:
83 - uses: actions/checkout@v5
84 - uses: dtolnay/rust-toolchain@nightly
85 - uses: dtolnay/install@cargo-docs-rs
86 - run: cargo docs-rs
87
88 clippy:
89 name: Clippy
90 runs-on: ubuntu-latest
91 if: github.event_name != 'pull_request'
92 timeout-minutes: 45
93 steps:
94 - uses: actions/checkout@v5
95 - uses: dtolnay/rust-toolchain@clippy
96 - run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic
97
98 miri:
99 name: Miri
100 needs: pre_ci
101 if: needs.pre_ci.outputs.continue
102 runs-on: ubuntu-latest
103 env:
104 MIRIFLAGS: -Zmiri-strict-provenance
105 timeout-minutes: 45
106 steps:
107 - uses: actions/checkout@v5
108 - uses: dtolnay/rust-toolchain@miri
109 - name: Run cargo miri test (64-bit little endian)
110 run: cargo miri test --target x86_64-unknown-linux-gnu
111 - name: Run cargo miri test (64-bit big endian)
112 run: cargo miri test --target powerpc64-unknown-linux-gnu
113 - name: Run cargo miri test (32-bit little endian)
114 run: cargo miri test --target i686-unknown-linux-gnu
115 - name: Run cargo miri test (32-bit big endian)
116 run: cargo miri test --target mips-unknown-linux-gnu
117
118 fuzz:
119 name: Fuzz
120 needs: pre_ci
121 if: needs.pre_ci.outputs.continue
122 runs-on: ubuntu-latest
123 timeout-minutes: 45
124 steps:
125 - uses: actions/checkout@v5
126 - uses: dtolnay/rust-toolchain@nightly
127 - uses: dtolnay/install@cargo-fuzz
128 - run: cargo fuzz check
129
130 outdated:
131 name: Outdated
132 runs-on: ubuntu-latest
133 if: github.event_name != 'pull_request'
134 timeout-minutes: 45
135 steps:
136 - uses: actions/checkout@v5
137 - uses: dtolnay/rust-toolchain@stable
138 - uses: dtolnay/install@cargo-outdated
139 - run: cargo outdated --workspace --exit-code 1
140 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1