1name: CI
2
3on:
4  pull_request:
5  push:
6    branches:
7      - staging
8      - trying
9
10jobs:
11  msrv:
12    name: Rust MSRV
13    runs-on: ubuntu-latest
14    steps:
15      - uses: actions/checkout@v2
16      - uses: dtolnay/rust-toolchain@1.36.0
17      - run: cargo check --no-default-features
18      - run: cargo check --no-default-features --features "use_alloc"
19      - run: cargo check
20
21  stable:
22    name: Rust Stable
23    runs-on: ubuntu-latest
24    steps:
25      - uses: actions/checkout@v2
26      - uses: dtolnay/rust-toolchain@stable
27      - run: cargo check --no-default-features
28      - run: cargo check --no-default-features --features "use_alloc"
29      - run: cargo test
30
31  # https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
32  end-success:
33    name: bors build finished
34    if: success()
35    runs-on: ubuntu-latest
36    needs: [msrv,stable]
37
38    steps:
39      - name: Mark the job as successful
40        run: exit 0
41
42  end-failure:
43    name: bors build finished
44    if: "!success()"
45    runs-on: ubuntu-latest
46    needs: [msrv,stable]
47
48    steps:
49      - name: Mark the job as a failure
50        run: exit 1
51
52