• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on:
4  push:
5    branches: [ master ]
6  pull_request:
7    branches: [ master ]
8
9env:
10  CARGO_TERM_COLOR: always
11
12jobs:
13  build:
14    strategy:
15      matrix:
16        rust: [1.40.0, stable, beta, nightly]
17    env:
18      CARGO_INCREMENTAL: 0 # Incremental compilation is slower and bloats the cache
19      RUST_BACKTRACE: 1
20
21    runs-on: ubuntu-latest
22
23    steps:
24    - uses: actions/checkout@v2
25
26    - uses: actions-rs/toolchain@v1
27      with:
28        profile: minimal
29        toolchain: ${{ matrix.rust }}
30        override: true
31
32    - name: Build
33      run: cargo build
34
35    - name: Check 1.40
36      if: ${{ matrix.rust == '1.40.0' }}
37      run: |
38        cargo "$@" check
39        cargo "$@" check --no-default-features
40
41    - name: Run tests
42      if: ${{ matrix.rust != '1.40.0' }}
43      run: ./ci.sh
44
45    - name: Check docs
46      if: ${{ matrix.rust == 'stable' }}
47      run: cargo doc
48