Skip to content

Update workflow

Update workflow #140

Workflow file for this run

on:
pull_request:
push:
branches: [main]
tags:
- "v*.*.*"
name: Verify
jobs:
test_linux:
name: Test Linux
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
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
test_macos:
name: Test MacOS
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
test_cross:
name: Test Android, FreeBSD, and NetBSD
strategy:
matrix:
test_target:
- aarch64-linux-android
- x86_64-unknown-freebsd
build_target:
- x86_64-unknown-netbsd
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
override: true
- name: Install Cross
run: |
CROSS_URL=https://github.com/cross-rs/cross/releases/download/v0.2.5/cross-x86_64-unknown-linux-gnu.tar.gz
mkdir -p "$HOME/.bin"
curl -sfSL --retry-delay 10 --retry 5 "${CROSS_URL}" | tar zxf - -C "$HOME/.bin"
echo "$HOME/.bin" >> $GITHUB_PATH
- name: Cross Test
run: cross test --target ${{ matrix.test_target }}
- name: Cross Build
run: cross build --target ${{ matrix.build_target }}