Skip to content

Update Project Dependencies #3

Update Project Dependencies

Update Project Dependencies #3

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: |
cargo build --release --target ${{ matrix.target }}
- name: Run tests
run: |
cargo test --target ${{ matrix.target }}
# Skip tests for cross-compilation targets that can't run natively
if: ${{ !(matrix.os == 'macos-latest' && matrix.target == 'aarch64-apple-darwin' && runner.arch == 'X64') }}