Prep for initial release #63
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [1.65.0, stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Install target needed | |
run: rustup target add thumbv7em-none-eabihf | |
- name: Build driver (release) | |
run: | | |
cargo build --release | |
- name: Build example | |
run: | | |
cargo build | |
working-directory: examples/read-decibel-value | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [1.65.0, stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust toolchain | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Install target needed | |
run: rustup target add thumbv7em-none-eabihf | |
- name: Run unit tests | |
run: | | |
cargo test | |
- name: Install Miri | |
if: matrix.rust == 'nightly' | |
run: | | |
rustup toolchain install nightly --component miri | |
- name: Run unit tests through Miri undefined behavior detection | |
if: matrix.rust == 'nightly' | |
run: | | |
cargo miri test | |
analysis: | |
name: Analysis | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/engjay/build-rustc-1-78-thumbv7em-nehf-meson:0.1.0 | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: -h gha.ci.analysis | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clippy | |
run: | | |
cargo clippy -- -A clippy::all | |
- name: Format | |
run: | | |
cargo fmt --all -- --check | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/engjay/build-rustc-1-78-thumbv7em-nehf-meson:0.1.0 | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
options: -h gha.ci.docs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run rustdoc | |
run: | | |
cargo doc | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: target/doc/pcb_artists_spl |