-
Notifications
You must be signed in to change notification settings - Fork 217
72 lines (68 loc) · 2.01 KB
/
rust.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
name: Rust
on:
push:
branches:
- trying
- staging
pull_request:
env:
CARGO_INCREMENTAL: 0
RUST_TEST_THREADS: 1
jobs:
build_tier_one:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos, windows]
channel: [1.49.0, stable, beta, nightly]
feature: [arc_lock, serde, deadlock_detection]
exclude:
- feature: deadlock_detection
channel: '1.49.0'
# Versions before 1.54 fail to build on the latest XCode.
- os: macos
channel: '1.49.0'
include:
- channel: nightly
feature: nightly
os: ubuntu
- channel: nightly
feature: hardware-lock-elision
os: ubuntu
steps:
- uses: actions/checkout@v4
- run: rustup default ${{ matrix.channel }}
- run: cargo build --all
- run: cargo test --all
- run: cargo build --all --features ${{ matrix.feature }}
- run: cargo test --all --features ${{ matrix.feature }}
if: matrix.feature == 'nightly'
build_other_platforms:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- wasm32-unknown-unknown
- x86_64-fortanix-unknown-sgx
#- x86_64-unknown-redox
#- x86_64-linux-android
steps:
- uses: actions/checkout@v4
- run: rustup default nightly
- run: rustup target add ${{ matrix.target }}
- run: cargo build --workspace --target ${{ matrix.target }} --features nightly
build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup default nightly
- run: cargo doc --workspace --features arc_lock,serde,deadlock_detection --no-deps -p parking_lot -p parking_lot_core -p lock_api
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup default nightly
- run: |
cd benchmark
cargo run --release --bin mutex -- 2 1 0 1 2
cargo run --release --bin rwlock -- 1 1 1 0 1 2