Debian Codegraph @

debian/missing-sources/zmij/.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: ${{matrix.os == 'macos' && 'macOS' || format('Rust {0} ({1})', matrix.rust, matrix.arch)}}
21 needs: pre_ci
22 if: needs.pre_ci.outputs.continue
23 runs-on: ${{matrix.os == 'macos' && 'macos-latest' || matrix.arch == 'x86_64' && 'ubuntu-latest' || 'ubuntu-24.04-arm'}}
24 strategy:
25 fail-fast: false
26 matrix:
27 rust: [nightly, beta, stable, 1.86.0, 1.68.0]
28 arch: [x86_64, aarch64]
29 os: [ubuntu]
30 include:
31 - rust: nightly
32 os: macos
33 timeout-minutes: 45
34 steps:
35 - uses: actions/checkout@v6
36 - uses: dtolnay/rust-toolchain@master
37 with:
38 toolchain: ${{matrix.rust}}
39 - name: Enable type layout randomization
40 run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV
41 if: matrix.rust == 'nightly'
42 - run: cargo check
43 - run: cargo build --tests --features no-panic --release
44 if: matrix.rust == 'nightly'
45 - run: cargo test
46 if: matrix.rust != '1.68.0'
47 - run: cargo test --release
48 if: matrix.rust != '1.68.0'
49 - run: cargo check
50 env:
51 RUSTFLAGS: ${{env.RUSTFLAGS}} -Ctarget-cpu=native
52 - run: cargo build --tests --features no-panic --release
53 if: matrix.rust == 'nightly'
54 env:
55 RUSTFLAGS: ${{env.RUSTFLAGS}} -Ctarget-cpu=native
56 - run: cargo test
57 if: matrix.rust != '1.68.0'
58 env:
59 RUSTFLAGS: ${{env.RUSTFLAGS}} -Ctarget-cpu=native
60 - run: cargo test --release
61 if: matrix.rust != '1.68.0'
62 env:
63 RUSTFLAGS: ${{env.RUSTFLAGS}} -Ctarget-cpu=native
64 - uses: actions/upload-artifact@v6
65 if: matrix.rust == 'nightly' && matrix.arch == 'x86_64' && matrix.os == 'ubuntu' && always()
66 with:
67 name: Cargo.lock
68 path: Cargo.lock
69 continue-on-error: true
70
71 doc:
72 name: Documentation
73 needs: pre_ci
74 if: needs.pre_ci.outputs.continue
75 runs-on: ubuntu-latest
76 env:
77 RUSTDOCFLAGS: -Dwarnings
78 timeout-minutes: 45
79 steps:
80 - uses: actions/checkout@v6
81 - uses: dtolnay/rust-toolchain@nightly
82 - uses: dtolnay/install@cargo-docs-rs
83 - run: cargo docs-rs
84
85 clippy:
86 name: Clippy
87 runs-on: ubuntu-latest
88 if: github.event_name != 'pull_request'
89 timeout-minutes: 45
90 steps:
91 - uses: actions/checkout@v6
92 - uses: dtolnay/rust-toolchain@clippy
93 with:
94 targets: aarch64-unknown-linux-gnu
95 - run: cargo clippy --tests --benches -- -Dclippy::all -Dclippy::pedantic
96 - run: cargo clippy --target=aarch64-unknown-linux-gnu -- -Dclippy::all -Dclippy::pedantic
97 - run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
98 env:
99 RUSTFLAGS: ${{env.RUSTFLAGS}} -Ctarget-cpu=native
100
101 miri:
102 name: Miri (${{matrix.name}})
103 needs: pre_ci
104 if: needs.pre_ci.outputs.continue
105 runs-on: ubuntu-latest
106 strategy:
107 fail-fast: false
108 matrix:
109 include:
110 - name: 64-bit little endian
111 target: x86_64-unknown-linux-gnu
112 - name: 64-bit big endian
113 target: powerpc64-unknown-linux-gnu
114 - name: 32-bit little endian
115 target: i686-unknown-linux-gnu
116 - name: 32-bit big endian
117 target: mips-unknown-linux-gnu
118 timeout-minutes: 45
119 steps:
120 - uses: actions/checkout@v6
121 - uses: dtolnay/rust-toolchain@miri
122 - run: cargo miri setup
123 - run: cargo miri test --target ${{matrix.target}}
124 env:
125 MIRIFLAGS: -Zmiri-strict-provenance
126
127 outdated:
128 name: Outdated
129 runs-on: ubuntu-latest
130 if: github.event_name != 'pull_request'
131 timeout-minutes: 45
132 steps:
133 - uses: actions/checkout@v6
134 - uses: dtolnay/rust-toolchain@stable
135 - uses: dtolnay/install@cargo-outdated
136 - run: cargo outdated --exit-code 1
137 - run: cargo outdated --manifest-path fuzz/Cargo.toml --exit-code 1
138
139 fuzz:
140 name: Fuzz
141 needs: pre_ci
142 if: needs.pre_ci.outputs.continue
143 runs-on: ubuntu-latest
144 timeout-minutes: 45
145 steps:
146 - uses: actions/checkout@v6
147 - uses: dtolnay/rust-toolchain@nightly
148 - uses: dtolnay/install@cargo-fuzz
149 - run: cargo fuzz check