name: CI
on:
push:
branches: [main, staging, trying]
pull_request:
branches: [main]
schedule:
- cron: "1 0 * * *"
env:
CARGO_TERM_COLOR: always
CORE_TARGET: thumbv7m-none-eabi
jobs:
test:
strategy:
matrix:
rust:
- stable
- nightly
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
target: ${{ env.CORE_TARGET }}
- name: Run testsuite
run: cargo xtest
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- run: cargo fmt --all -- --check
- uses: actions-rs/clippy-check@v1
with:
args: "-- --deny warnings"
token: ${{ secrets.GITHUB_TOKEN }}
ci-success:
name: ci
if: success()
needs:
- static-checks
- test
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0