name: Continuous Integration
on:
pull_request:
push:
branches:
- master
- staging
- trying
env:
CARGO_INCREMENTAL: 0
jobs:
build:
name: build
strategy:
matrix:
os:
- ubuntu-20.04
target:
- i686-unknown-linux-gnu
- i686-unknown-linux-musl
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
include:
- os: macos-latest
target: x86_64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-gnu
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
toolchain: stable
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.os == 'ubuntu-20.04' }}
command: build
args: --target ${{ matrix.target }} --locked
- name: Run
uses: actions-rs/cargo@v1
with:
use-cross: ${{ matrix.os == 'ubuntu-20.04' }}
command: run
args: --target ${{ matrix.target }} -- -V
test:
name: test
strategy:
matrix:
toolchain:
- nightly
- nightly-2021-08-01
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
components: rust-src
toolchain: ${{ matrix.toolchain }}
override: true
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
ci-success:
name: ci
if: ${{ success() }}
needs:
- build
- test
runs-on: ubuntu-20.04
steps:
- name: CI succeeded
run: exit 0