-
Notifications
You must be signed in to change notification settings - Fork 2
97 lines (86 loc) · 2.45 KB
/
ci.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
jobs:
test_release:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release -- --nocapture
test_x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Setup toolchain
run: |
sudo apt-get install gcc-multilib -y
rustup target install i686-unknown-linux-gnu
- name: Build
run: cargo build --release --target=i686-unknown-linux-gnu
- name: Test
run: cargo test --release --target=i686-unknown-linux-gnu -- --nocapture
test_wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Install wasmtime
run: |
curl https://wasmtime.dev/install.sh -sSf | bash
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
- name: Install cargo-wasi
run: cargo install cargo-wasi
- name: Test without SIMD
run: cargo wasi test --release -- --nocapture
- name: Test with SIMD
run: |
rustup install nightly
RUSTFLAGS="-C target-feature=+simd128" cargo +nightly wasi test --release -- --nocapture
test_aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: test_aarch64
with:
arch: aarch64
distro: ubuntu18.04
# Not required, but speeds up builds
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install curl llvm clang -y
curl https://sh.rustup.rs -sSf | bash -s -- -y
run: |
source "$HOME/.cargo/env"
rustup update
cargo build --release
cargo test --release -- --nocapture
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Rustfmt
run: cargo fmt --check --verbose
- name: Clippy
run: cargo clippy --verbose --all-features -- -Dwarnings