Skip to content

Merge #34

Merge #34 #71

Workflow file for this run

on:
push:
branches: [ staging, trying, master ]
pull_request:
name: Continuous integration
env:
CARGO_TERM_COLOR: always
TARGET: thumbv7em-none-eabihf
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.52.0 # MSRV
- stable
device_feature:
- fdcan_g0_g4_l5
- fdcan_h7
steps:
- uses: actions/checkout@v2
- name: Cache cargo registry and index
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-target-${{ matrix.rust }}-${{ hashFiles('**/Cargo.toml') }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ env.TARGET }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ env.TARGET }} --features ${{ matrix.device_feature }}
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --verbose --features ${{ matrix.device_feature }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Check code formatting
run: cargo fmt -- --check
ci:
if: ${{ success() }}
# all new jobs must be added to this list
needs: [test, lint]
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0