-
Notifications
You must be signed in to change notification settings - Fork 121
75 lines (68 loc) · 2.17 KB
/
ci_test_asan.yml
File metadata and controls
75 lines (68 loc) · 2.17 KB
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
name: TestASan
on:
merge_group:
types: [checks_requested]
push:
branches:
- master
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '.github/workflows/ci_test_asan.yml'
pull_request:
branches:
- master
paths:
- '**/*.rs'
- '**/Cargo.toml'
- '.github/workflows/ci_test_asan.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
test_asan:
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
setup:
- os: 'ubuntu-22.04'
features: 'sync,ring'
target: 'x86_64-unknown-linux-gnu'
- os: 'ubuntu-22.04'
features: 'polling,sync,ring'
target: 'x86_64-unknown-linux-gnu'
- os: 'ubuntu-22.04'
features: 'polling,sync,ring'
no_default_features: true
target: 'x86_64-unknown-linux-gnu'
steps:
- uses: actions/checkout@v6
- name: Setup nightly toolchain with rust-src
run: rustup toolchain install nightly --component rust-src
- name: Setup target
if: ${{ matrix.setup.target }}
run: rustup +nightly target install ${{ matrix.setup.target }}
- uses: taiki-e/install-action@nextest
- name: Run ASan tests
run: |
set -ex
ARGS=("--features" "all,nightly")
# Add features if features is not empty
if [[ -n "${{ matrix.setup.features }}" ]]; then
ARGS+=("--features" "${{ matrix.setup.features }}")
fi
# Add no-default-features if no_default_features is true
if [[ -n "${{ matrix.setup.no_default_features }}" ]]; then
ARGS+=("--no-default-features")
fi
# Specify target if target is not empty
if [[ -n "${{ matrix.setup.target }}" ]]; then
ARGS+=("--target" "${{ matrix.setup.target }}")
fi
# stress tests takes too long with ASAN, filter them out
cargo +nightly nextest run --profile asan -Zbuild-std "${ARGS[@]}"
env:
RUSTFLAGS: -Zsanitizer=address