Skip to content

chore: rustfmt

chore: rustfmt #25

Workflow file for this run

name: CI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-14
target: aarch64-apple-darwin
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
use_cross: true
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Cross
if: matrix.use_cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
shell: bash
run: |
if [ "${{ matrix.use_cross }}" == "true" ]; then
cross build --verbose --target ${{ matrix.target }}
else
cargo build --verbose --target ${{ matrix.target }}
fi
- name: Run tests
shell: bash
run: |
if [ "${{ matrix.use_cross }}" == "true" ]; then
cross test --verbose --target ${{ matrix.target }}
else
cargo test --verbose --target ${{ matrix.target }}
fi