Skip to content

test cross platform build #16

test cross platform build

test cross platform build #16

Workflow file for this run

on:
push:
name: Tests
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
target: aarch64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --frozen --release
tests:
runs-on: ubuntu-latest
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
override: true
- name: Install Prettier
run: npm install -g prettier
- name: Checkout
uses: actions/checkout@v2
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- name: Run Prettier
run: prettier --check "**/*.{md,json,prettierrc}"
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Run tests
uses: actions-rs/cargo@v1
env:
RUST_BACKTRACE: 1
with:
command: test