name: Cargo Check/Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
strategy:
matrix:
target:
- os: windows-latest
triple: i686-pc-windows-msvc
- os: windows-latest
triple: x86_64-pc-windows-msvc
- os: windows-2019
triple: i686-pc-windows-gnu
- os: windows-2019
triple: x86_64-pc-windows-gnu
- os: ubuntu-latest
triple: x86_64-unknown-linux-gnu
- os: ubuntu-latest
triple: i686-unknown-linux-gnu
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
targets: ${{ matrix.target.triple }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
targets: ${{ matrix.target.triple }}
- if: matrix.target.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install gcc-multilib
- if: matrix.target.triple == 'x86_64-pc-windows-gnu'
name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
- if: matrix.target.triple == 'i686-pc-windows-gnu'
name: Set up MinGW
uses: egor-tensin/setup-mingw@v2
with:
platform: x86
- name: Cargo Check - Default Features Only
run: ${{ matrix.target.rustflags }} cargo check --target ${{ matrix.target.triple }}
- name: Cargo Check - All Features
run: ${{ matrix.target.rustflags }} cargo +nightly check --target ${{ matrix.target.triple }} --all-features
- name: Cargo Tests - Stable
run: ${{ matrix.target.rustflags }} cargo test --target ${{ matrix.target.triple }}
- name: Cargo Tests - Nightly
run: ${{ matrix.target.rustflags }} cargo +nightly test --target ${{ matrix.target.triple }} --all-features