Debian Codegraph @

debian/rust-vendor/simd-adler32/.github/workflows/build.yaml

raw
1 name: build
2
3 on:
4 push:
5 pull_request:
6 branches: [main]
7
8 jobs:
9 clippy:
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v1
13 - uses: actions-rs/toolchain@v1
14 with:
15 toolchain: nightly
16 components: clippy
17 override: true
18 - uses: actions-rs/clippy-check@v1
19 with:
20 token: ${{ secrets.GITHUB_TOKEN }}
21 args: --all-features
22
23 test-doc:
24 runs-on: ubuntu-latest
25 steps:
26 - uses: actions/checkout@v2
27 - name: Install toolchain
28 uses: actions-rs/toolchain@v1
29 with:
30 profile: minimal
31 toolchain: nightly
32 override: true
33 - uses: Swatinem/rust-cache@v1
34 - run: cargo install cargo-deadlinks
35 - name: doc
36 env:
37 RUSTDOCFLAGS: --cfg doc_cfg
38 run: cargo deadlinks --ignore-fragments -- --all
39
40 test:
41 runs-on: ${{ matrix.os }}
42 strategy:
43 fail-fast: false
44 matrix:
45 include:
46 - os: ubuntu-latest
47 target: x86_64-unknown-linux-gnu
48 toolchain: stable
49 - os: ubuntu-24.04-arm
50 target: aarch64-unknown-linux-gnu
51 toolchain: stable
52 - os: macos-26-intel
53 target: x86_64-apple-darwin
54 toolchain: stable
55 - os: macos-latest
56 target: aarch64-apple-darwin
57 toolchain: stable
58 - os: windows-latest
59 target: x86_64-pc-windows-gnu
60 toolchain: stable
61 - os: windows-latest
62 target: x86_64-pc-windows-msvc
63 toolchain: beta
64 # Test both windows-gnu and windows-msvc; use beta rust on one
65 - os: ubuntu-latest
66 deps: sudo apt-get update ; sudo apt install gcc-multilib
67 target: i686-unknown-linux-gnu
68 toolchain: nightly
69 - os: macos-latest
70 target: aarch64-apple-darwin
71 toolchain: nightly
72 - os: ubuntu-24.04-arm
73 target: aarch64-unknown-linux-gnu
74 toolchain: nightly
75 - os: ubuntu-latest
76 target: x86_64-unknown-linux-gnu
77 toolchain: nightly
78 variant: minimal_versions
79
80 steps:
81 - uses: actions/checkout@v2
82 - name: Install toolchain
83 uses: actions-rs/toolchain@v1
84 with:
85 profile: minimal
86 target: ${{ matrix.target }}
87 toolchain: ${{ matrix.toolchain }}
88 override: true
89 - uses: Swatinem/rust-cache@v1
90 - run: ${{ matrix.deps }}
91 - name: Maybe minimal versions
92 if: ${{ matrix.variant == 'minimal_versions' }}
93 run: cargo generate-lockfile -Z minimal-versions
94
95 - name: Test
96 run: |
97 cargo test --lib --target ${{ matrix.target }} ${{ matrix.toolchain == 'nightly' && '--features=nightly' || '' }}
98
99 env:
100 # Enables address sanitization if supported target and nightly.
101 RUSTFLAGS: |
102 ${{
103 (
104 matrix.toolchain == 'nightly' && (
105 matrix.target == 'aarch64-apple-darwin' ||
106 matrix.target == 'aarch64-fuchsia' ||
107 matrix.target == 'aarch64-unknown-linux-gnu' ||
108 matrix.target == 'x86_64-apple-darwin' ||
109 matrix.target == 'x86_64-fuchsia' ||
110 matrix.target == 'x86_64-unknown-freebsd' ||
111 matrix.target == 'x86_64-unknown-linux-gnu'
112 )
113 )
114 && '-Z sanitizer=address'
115 || ''
116 }}
117
118 test-cross:
119 runs-on: ${{ matrix.os }}
120 strategy:
121 fail-fast: false
122 matrix:
123 include:
124 - os: ubuntu-latest
125 target: arm-unknown-linux-gnueabi
126 toolchain: stable
127 - os: ubuntu-latest
128 target: arm-unknown-linux-gnueabi
129 toolchain: nightly
130 - os: ubuntu-latest
131 target: thumbv7neon-unknown-linux-gnueabihf
132 toolchain: stable
133 - os: ubuntu-latest
134 target: thumbv7neon-unknown-linux-gnueabihf
135 toolchain: nightly
136
137 steps:
138 - uses: actions/checkout@v2
139 - name: Install toolchain
140 uses: actions-rs/toolchain@v1
141 with:
142 profile: minimal
143 target: ${{ matrix.target }}
144 toolchain: ${{ matrix.toolchain }}
145 override: true
146
147 - uses: Swatinem/rust-cache@v1
148 - name: Install cross
149 run: cargo install cross || true
150 - name: Test
151 run: |
152 cross test --no-fail-fast --target ${{ matrix.target }} ${{ matrix.toolchain == 'nightly' && '--features=nightly' || '' }}
153
154 test-msrv:
155 runs-on: ubuntu-latest
156 steps:
157 - uses: actions/checkout@v2
158 - name: Install toolchain
159 uses: actions-rs/toolchain@v1
160 with:
161 target: x86_64-unknown-linux-gnu
162 toolchain: 1.36.0 # MSRV
163 - uses: Swatinem/rust-cache@v1
164 - name: Test
165 run: cargo test --target=x86_64-unknown-linux-gnu --no-default-features --features=std
166
167 test-no-std:
168 runs-on: ubuntu-latest
169 steps:
170 - uses: actions/checkout@v2
171 - name: Install toolchain
172 uses: actions-rs/toolchain@v1
173 with:
174 profile: minimal
175 toolchain: nightly
176 target: thumbv6m-none-eabi
177 override: true
178 - uses: Swatinem/rust-cache@v1
179 - name: Build top-level only
180 run: cargo build --target=thumbv6m-none-eabi --no-default-features
181
182 test-miri:
183 runs-on: ubuntu-latest
184 steps:
185 - uses: actions/checkout@v2
186 - name: Install toolchain
187 uses: actions-rs/toolchain@v1
188 with:
189 profile: minimal
190 toolchain: nightly
191 override: true
192 - uses: Swatinem/rust-cache@v1
193 - name: Install Miri
194 run: |
195 rustup toolchain install nightly --component miri
196 rustup override set nightly
197 cargo miri setup
198 - name: Run scalar tests under miri
199 run: cargo +nightly miri test scalar
200 - name: Run sse2 tests under miri
201 run: cargo +nightly miri test sse2
202 - name: Run ssse3 tests under miri
203 run: cargo +nightly miri test --lib ssse3
204 env:
205 RUSTFLAGS: "-Ctarget-cpu=x86-64-v2"
206 - name: Run avx2 tests under miri
207 run: cargo +nightly miri test --lib avx2
208 env:
209 RUSTFLAGS: "-Ctarget-cpu=x86-64-v3"
210 - name: Run avx512 tests under miri
211 run: cargo +nightly miri test --lib --features=nightly avx512
212 env:
213 RUSTFLAGS: "-Ctarget-cpu=x86-64-v4"