-
Notifications
You must be signed in to change notification settings - Fork 34
98 lines (96 loc) · 2.75 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
stable:
name: stable
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable --no-self-update
- name: Test in debug mode
run: cargo test --no-fail-fast
- name: Test in release mode
run: cargo test --no-fail-fast --release
- name: Check with no default features
run: cargo check --no-default-features
nightly:
name: nightly
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly --no-self-update
- name: Test in debug mode
run: cargo +nightly test --no-fail-fast
- name: Test in release mode
run: cargo +nightly test --no-fail-fast --release
- name: Check with no default features
run: cargo +nightly check --no-default-features
- name: Build benches
run: cargo +nightly build --benches --all
asan:
name: asan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update nightly --no-self-update
- name: Run address sanitizer
run: RUSTFLAGS="-Z sanitizer=address" cargo +nightly test --lib --target x86_64-unknown-linux-gnu
env:
ASAN_OPTIONS: "detect_odr_violation=0 detect_leaks=0"
RUST_BACKTRACE: "1"
cross-test:
name: cross-test
runs-on: ubuntu-latest
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update --no-self-update
- name: Install Cross
run: cargo install --force cross
- name: Test
run: cross test --target=${{ matrix.target }}
- name: Check with no default features
run: cross check --target=${{ matrix.target }} --no-default-features
cross-check:
name: cross-check
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update --no-self-update
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Check
run: cross check --target=${{ matrix.target }}
- name: Check with no default features
run: cross check --target=${{ matrix.target }} --no-default-features