name: CI
on:
pull_request:
branches: [main]
schedule:
- cron: "1 0 * * *"
merge_group:
env:
CARGO_TERM_COLOR: always
CORE_TARGET: thumbv7em-none-eabi
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Use the latest stable release
run: |
rustup update stable --no-self-update
rustup default stable
- name: Install Rust target for cross-compilation
run: rustup target add ${{ env.CORE_TARGET }}
- name: Run testsuite
run: cargo xtest
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use the latest stable release
run: rustup update stable && rustup default stable
- run: cargo fmt -- --check
- run: cargo fmt -- --check
working-directory: test-flip-link-app/
- run: cargo clippy -- --deny warnings
- run: cargo clippy -- --deny warnings
working-directory: test-flip-link-app/
ci-success:
name: CI finished successfully
runs-on: ubuntu-latest
if: success()
needs:
- test
- static-checks
steps:
- name: Mark the build as successful
run: exit 0