-
-
Notifications
You must be signed in to change notification settings - Fork 9
81 lines (76 loc) · 2.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule: # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule
- cron: '0 0 * * 0' # at midnight of each sunday
workflow_dispatch:
name: CI
jobs:
develop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- run: cargo fmt --all -- --check
- run: cargo clippy -- -D warnings
- run: cargo build --release --workspace --tests
rust-version-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable
- 1.70.0 # MSRV
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- run: |
if [ "${{ matrix.toolchain }}" = "stable" ]; then
cargo test --release --workspace --exclude simd-benches
else
cargo build --release --workspace --exclude simd-benches
fi
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- i686-unknown-linux-gnu
- aarch64-unknown-linux-gnu
# - armv7-unknown-linux-gnueabihf # FIXME
- wasm32-unknown-unknown
# - mips-unknown-linux-gnu # missing toolchain
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- uses: taiki-e/install-action@v2
with:
tool: cross
- run: |
if [ "${{ matrix.target }}" == "wasm32-unknown-unknown" ]; then
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | bash
fi
- run: |
python3 ./scripts/testgen.py --target "${{ matrix.target }}" | bash -ex
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- run: |
cargo miri test --workspace --exclude simd-benches