Skip to content

Close #347

Close #347 #98

Workflow file for this run

name: Continuous Integration
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
- staging
- trying
jobs:
# NOTE all these jobs need to be added to the `needs` section of the ci-* 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
# Don't remove this target; test coverage in `smoke.rs` relies on us
# running at least one pinned toolchain.
- 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
# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
# bors.tech integration
ci-success:
name: ci
if: ${{ success() }}
needs:
- build
- test
runs-on: ubuntu-20.04
steps:
- name: CI succeeded
run: exit 0