CI #72
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: | |
- dev | |
- main | |
pull_request: | |
branches: | |
- dev | |
- main | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
# Build the app on all supported platforms | |
build: | |
strategy: | |
matrix: | |
include: | |
- build: x86_64-musl | |
host: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
rust: stable | |
runs-on: ${{ matrix.host }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
#- name: Set minimal profile (Windows only) | |
# if: matrix.host == 'windows-latest' | |
# run: rustup set profile minimal | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: "${{matrix.build}}" | |
- name: install packages (ubuntu) | |
if: startsWith(matrix.host, 'ubuntu') | |
run: scripts/install-ubuntu-packages | |
- name: Build | |
run: cargo build --locked | |
# We only need to run the checks on a single platform | |
checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ubuntu-latest | |
- name: install packages | |
run: scripts/install-ubuntu-packages | |
# Checks begin here! | |
- run: cargo fmt --all -- --check | |
- run: cargo test --locked | |
- run: cargo clippy --locked --all-targets | |
# We care that the benchmarks build and run, not about their numeric output. | |
# To keep the CI a bit leaner, do this in the dev profile. | |
- run: cargo build --locked --all-targets | |
- run: cargo doc --no-deps --locked |