Add print snapshot tests #3864
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: [main] | |
schedule: | |
# runs 1 min after 2 or 1 AM (summer/winter) berlin time | |
- cron: "1 0 * * *" | |
merge_group: | |
env: | |
CARGO_TERM_COLOR: always | |
NO_STD_TARGET: thumbv7em-none-eabi # firmware uses atomics | |
QEMU_TARGET: thumbv7m-none-eabi | |
jobs: | |
host: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install C libraries for tooling on ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install libudev-dev libusb-1.0-0-dev | |
- name: Check that all crates that can be compiled for the host build, check that defmt compiles with different features, run all unit tests on the host | |
run: cargo xtask -d test-host | |
cross: | |
strategy: | |
matrix: | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install Rust targets, build defmt crates for no_std targets, build defmt dependent crates for cortex-m targets, build panic-probe with different features | |
run: cargo xtask test-cross | |
lint: | |
strategy: | |
matrix: | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Run rustfmt & clippy | |
run: cargo xtask test-lint | |
ui: | |
strategy: | |
matrix: | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install Rust stable, run all UI tests on the host | |
run: cargo xtask test-ui | |
mdbook: | |
strategy: | |
matrix: | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: latest | |
- name: Run book tests | |
run: cargo xtask test-book | |
qemu-snapshot: | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
- "1.76" # MSRV | |
- nightly # some tests use unstable features | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use the latest ${{ matrix.toolchain }} release | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install QEMU_TARGET | |
run: rustup target add ${{ env.QEMU_TARGET }} | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install qemu qemu-system-arm | |
- name: Run QEMU snapshot tests | |
run: cargo xtask test-snapshot | |
backcompat: | |
strategy: | |
matrix: | |
toolchain: | |
- "stable" | |
- "1.76" # MSRV | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set Rust version | |
uses: ./.github/actions/update-rust | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install QEMU_TARGET | |
run: rustup target add ${{ env.QEMU_TARGET }} | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install qemu qemu-system-arm | |
- name: Run backward compatibility test | |
run: cargo xtask test-backcompat |