• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Rust
2
3on:
4  push: {}
5  pull_request: {}
6
7jobs:
8  build_test:
9    runs-on: ubuntu-latest
10    strategy:
11      matrix:
12        rust:
13        - 1.34.0
14        - 1.36.0
15        - stable
16        - beta
17        - nightly
18    steps:
19    - uses: actions/checkout@v1
20    - uses: actions-rs/toolchain@v1
21      with:
22        profile: minimal
23        toolchain: ${{ matrix.rust }}
24        default: true
25    - name: Build the crate on minimal version.
26      uses: actions-rs/cargo@v1
27      with:
28        command: build
29    - name: Build the crate on 1.36 with features.
30      if: matrix.rust != '1.34.0'
31      uses: actions-rs/cargo@v1
32      with:
33        command: build
34        # Using `extern crate alloc` is only possible after 1.36
35        args: --features=alloc,std,grab_spare_slice
36    - name: Test on Stable/Beta
37      if: matrix.rust != '1.34.0' && matrix.rust != '1.36.0'
38      uses: actions-rs/cargo@v1
39      with:
40        command: test
41        args: --features=alloc --features=grab_spare_slice --features=rustc_1_40
42    - name: Test on Nightly with All Features
43      if: matrix.rust == 'nightly'
44      uses: actions-rs/cargo@v1
45      with:
46        command: test
47        args: --all-features
48