aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/rust.yml
blob: ffe0edad1b3d1199c904532b9e6e460d8255c8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Rust

on: [push, pull_request]

env:
  CARGO_TERM_COLOR: always

jobs:
  check:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        rust:
          - stable
          - beta
          - nightly
          - 1.46.0
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true

      - name: Default features
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --features example_generated

  embedded:
    name: Build (embedded)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          target: thumbv6m-none-eabi
          override: true

      - name: Default features
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: -Z avoid-dev-deps --features example_generated --target thumbv6m-none-eabi