sd/.github/workflows/test.yml
2021-02-28 23:46:49 -05:00

55 lines
1.2 KiB
YAML

name: Test
on: [pull_request]
jobs:
test:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
use-cross: false
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
use-cross: false
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
use-cross: true
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
- os: macos-latest
target: x86_64-apple-darwin
use-cross: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set the version
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.use-cross }}
command: test
args: --target ${{ matrix.target }}