• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  - push
5  - pull_request
6
7env:
8  CARGO_TERM_COLOR: always
9
10jobs:
11  build:
12    runs-on: ubuntu-latest
13    strategy:
14      matrix:
15        rust:
16          - stable
17          - beta
18          - nightly
19          - 1.20.0 # MSRV
20    steps:
21      - uses: actions/checkout@v2
22      - name: Install Rust
23        uses: actions-rs/toolchain@v1
24        with:
25          profile: minimal
26          toolchain: ${{ matrix.rust }}
27          override: true
28      - name: Build
29        run: cargo build
30      - name: Run tests
31        run: cargo test
32      - name: Run tests (without default features)
33        run: cargo test --no-default-features
34
35  no_std:
36    runs-on: ubuntu-latest
37    steps:
38      - uses: actions/checkout@v2
39      - name: Test no_std support
40        run: |
41          rustup target add thumbv6m-none-eabi
42          cargo build --no-default-features --target thumbv6m-none-eabi
43
44  format:
45    runs-on: ubuntu-latest
46    steps:
47      - uses: actions/checkout@v2
48      - name: Check formatting
49        run: cargo fmt -- --check
50