on: [pull_request]
name: CI
jobs:
check:
name: Check+Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.37
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly override: true
components: rustfmt
- name: Print rustfmt version
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --version
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
check_arm64:
name: Check and test Linux arm 64bit
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: aarch64-unknown-linux-gnu
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
use-cross: true
args: --target aarch64-unknown-linux-gnu
- name: Run cargo test for arm
uses: actions-rs/cargo@v1
with:
command: test
use-cross: true
args: --release --target aarch64-unknown-linux-gnu
check_x86:
name: Check and test Linux x86 32bit
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: i586-unknown-linux-gnu
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
use-cross: true
args: --target i586-unknown-linux-gnu
- name: Run cargo test for i586
uses: actions-rs/cargo@v1
with:
command: test
use-cross: true
args: --target i586-unknown-linux-gnu