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