chore: Update deps & ci #108
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: Build and test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_VERSION: 1.72.1 | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ "ubuntu-latest", "ubuntu-20.04", "macos-12" ] | |
env: | |
SYSTEM: ${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || 'macos' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Install dependencies | |
run: make install-deps-${{ env.SYSTEM }} | |
- name: Build & Test (Debug) | |
run: make test-debug-${{ env.SYSTEM }} | |
- name: Build & Test (Release) | |
run: make test-release-${{ env.SYSTEM }} | |
doc-rs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- name: Install dependencies ubuntu | |
run: make install-deps-ubuntu | |
- name: Generate Doc | |
env: | |
DOCS_RS: 1 | |
run: cargo doc -v | |
pre-commit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
components: clippy, rustfmt | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Pre-commit | |
run: | | |
pre-commit install --install-hooks | |
pre-commit run --all --show-diff-on-failure |