Running ci on macos #1221
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: Rust | |
on: [push, pull_request] | |
jobs: | |
clippy: | |
name: Test and Clippy | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Deps | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt update | |
sudo apt install -yy libseccomp-dev build-essential fpc | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: clippy | |
- uses: taiki-e/install-action@nextest | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-test-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: cargo nextest run (tests) | |
env: | |
RUST_BACKTRACE: 1 | |
run: cargo nextest run --workspace --no-fail-fast | |
- name: cargo clippy | |
run: tools/clippy.sh | |
rustfmt: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: rustfmt | |
- name: cargo fmt | |
run: cargo fmt --all -- --check | |
ts-bindings: | |
name: Typescript Bindings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -yy libseccomp-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
id: install-rust | |
with: | |
components: clippy | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-ts-bindings-${{ steps.install-rust.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Rebuild bindings | |
working-directory: ./bindings/ts | |
run: ./rebuild.sh | |
- name: Check diff | |
working-directory: ./bindings/ts | |
run: git diff --exit-code src/ schema/ |