Skip to content

[aarch64 support] build for amd64 and arm64 #326

[aarch64 support] build for amd64 and arm64

[aarch64 support] build for amd64 and arm64 #326

Workflow file for this run

name: Rust
on: push
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: 1.82.0
jobs:
test:
name: Test / ${{ matrix.target }} ${{ matrix.opt }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
opt:
- ''
- --release
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Run tests
# Ensure debug output is also tested
env:
RUST_LOG: debug
run: cargo test --all-features ${{ matrix.opt }}
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check project and dependencies
run: cargo check
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: rustfmt
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check formatting
run: cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: clippy
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check code with clippy
run: cargo clippy -- -D warnings --no-deps