name: CI
on:
push:
branches: [ main]
pull_request:
branches: [ main ]
schedule:
- cron: '1 0 * * *'
env:
CARGO_TERM_COLOR: always
APP_NAME : test-flip-link-app
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: 10
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: RUSTFLAGS='--deny warnings' cargo build
shell: bash
- name: Check fmt
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'stable'
run: |
rustup component add rustfmt
cargo fmt --all -- --check
build_app:
strategy:
matrix:
rust:
- stable
- nightly
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Check out flip-link repo
uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
target: ${{ env.CORE_TARGET }}
- name: Install dependencies
run: |
cargo install --debug --path .
- name: Build App
run: |
cd ${{ env.APP_NAME }}
cargo build --examples