Skip to content

Fixes

Fixes #4

Workflow file for this run

name: Build & Test
on:
push:
branches:
- master
- staging
- trying
pull_request:
branches: [ master ]
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust:
- 1.36.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --all --verbose
- name: Run tests (no-default-features)
run: cargo test --all --verbose --no-default-features --features std
- name: Build docs
run: cargo doc
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --lib --tests -- --deny warnings
nostd:
name: no_std
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features
cross:
name: cross
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
- x86_64-unknown-linux-musl
- i686-unknown-linux-gnu
- armv5te-unknown-linux-gnueabi
- armv7-unknown-linux-gnueabihf
- aarch64-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- mipsel-unknown-linux-gnu
- mips64el-unknown-linux-gnuabi64
- s390x-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.arch }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.arch }}
# These jobs doesn't actually test anything, but they're only used to tell
# bors the build completed, as there is no practical way to detect when a
# workflow is successful listening to webhooks only.
#
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
end-success:
name: bors build finished
if: success()
runs-on: ubuntu-latest
needs:
- test
- fmt
- clippy
- cross
steps:
- name: Mark the job as successful
run: exit 0