Merge pull request #2481 from hannobraun/dependabot/cargo/cargo-a457a… #4628
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 | |
# Define the triggers; usually merges to the repository | |
# default branch and pull-requests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
env: | |
CARGO_TERM_COLOR: always | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
- name: Run Clippy | |
run: cargo clippy --workspace --all-features -- -D warnings | |
- name: Reject uncommitted changes | |
run: git diff --exit-code | |
- name: Build documentation | |
run: cargo doc --no-deps --document-private-items --all-features --workspace | |
env: | |
RUSTDOCFLAGS: -D warnings | |
- name: Run `cross-compiler` | |
run: cargo run --package cross-compiler | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
# Windows CI build disabled for the time being. More information: | |
# https://github.com/hannobraun/fornjot/issues/2376 | |
# - windows-latest | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run `cargo build` | |
run: cargo build --all-features | |
- name: Run `cargo test` | |
run: cargo test --all-features | |
- name: Run `export-validator` | |
run: cargo run --package export-validator |