• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on:
4  push:
5    branches:
6      - trying
7      - staging
8  pull_request:
9
10env:
11  RUST_TEST_THREADS: 1
12
13jobs:
14  build_tier_one:
15    runs-on: ${{ matrix.os }}-latest
16    strategy:
17      matrix:
18        os: [ubuntu, macos, windows]
19        channel: [1.49.0, stable, beta, nightly]
20        feature: [arc_lock, serde, deadlock_detection]
21        exclude: 
22          - feature: deadlock_detection
23            channel: '1.49.0'
24        include:
25          - channel: nightly
26            feature: nightly
27            os: ubuntu
28          - channel: nightly
29            feature: hardware-lock-elision
30            os: ubuntu
31
32    steps:
33    - uses: actions/checkout@v2
34    - run: rustup default ${{ matrix.channel }}
35    - run: cargo build --all
36    - run: cargo test --all
37    - run: cargo build --all --features ${{ matrix.feature }}
38    - run: cargo test --all --features ${{ matrix.feature }}
39      if: matrix.feature == 'nightly'
40  build_other_platforms:
41    runs-on: ubuntu-latest
42    strategy:
43      matrix:
44        target: 
45          - wasm32-unknown-unknown
46          - x86_64-fortanix-unknown-sgx
47          #- x86_64-unknown-redox
48          #- x86_64-linux-android
49    steps:
50    - uses: actions/checkout@v2
51    - run: rustup default nightly
52    - run: rustup target add ${{ matrix.target }}
53    - run: cargo build --workspace --target ${{ matrix.target }} --features nightly
54  build_docs:
55    runs-on: ubuntu-latest
56    steps:
57      - uses: actions/checkout@v2
58      - run: rustup default nightly
59      - run: cargo doc --workspace --features arc_lock,serde,deadlock_detection --no-deps -p parking_lot -p parking_lot_core -p lock_api
60  benchmark:
61    runs-on: ubuntu-latest
62    steps:
63      - uses: actions/checkout@v2
64      - run: rustup default nightly
65      - run: |
66          cd benchmark
67          cargo run --release --bin mutex -- 2 1 0 1 2
68          cargo run --release --bin rwlock -- 1 1 1 0 1 2
69