| 1 |
name: Rust |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
env: |
| 6 |
CARGO_TERM_COLOR: always |
| 7 |
|
| 8 |
jobs: |
| 9 |
check: |
| 10 |
name: Test |
| 11 |
runs-on: ubuntu-latest |
| 12 |
strategy: |
| 13 |
fail-fast: true |
| 14 |
matrix: |
| 15 |
rust: |
| 16 |
- stable |
| 17 |
- beta |
| 18 |
- nightly |
| 19 |
- 1.46.0 |
| 20 |
steps: |
| 21 |
- name: Checkout sources |
| 22 |
uses: actions/checkout@v2 |
| 23 |
|
| 24 |
- name: Install Rust toolchain |
| 25 |
uses: actions-rs/toolchain@v1 |
| 26 |
with: |
| 27 |
profile: minimal |
| 28 |
toolchain: ${{ matrix.rust }} |
| 29 |
override: true |
| 30 |
|
| 31 |
- name: Default features |
| 32 |
uses: actions-rs/cargo@v1 |
| 33 |
with: |
| 34 |
command: test |
| 35 |
args: --features example_generated |
| 36 |
|
| 37 |
embedded: |
| 38 |
name: Build (embedded) |
| 39 |
runs-on: ubuntu-latest |
| 40 |
steps: |
| 41 |
- name: Checkout sources |
| 42 |
uses: actions/checkout@v2 |
| 43 |
|
| 44 |
- name: Install Rust toolchain |
| 45 |
uses: actions-rs/toolchain@v1 |
| 46 |
with: |
| 47 |
profile: minimal |
| 48 |
toolchain: nightly |
| 49 |
target: thumbv6m-none-eabi |
| 50 |
override: true |
| 51 |
|
| 52 |
- name: Default features |
| 53 |
uses: actions-rs/cargo@v1 |
| 54 |
with: |
| 55 |
command: build |
| 56 |
args: -Z avoid-dev-deps --features example_generated --target thumbv6m-none-eabi |