2019-09-05 10:08:48 -07:00
|
|
|
name: CI
|
|
|
|
|
2020-05-13 13:10:04 -07:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2019-09-05 10:08:48 -07:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2020-05-14 13:31:01 -07:00
|
|
|
test:
|
2020-08-14 16:51:03 -07:00
|
|
|
name: Test on ${{ matrix.os }}
|
2020-05-14 13:31:01 -07:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
|
2019-09-05 10:08:48 -07:00
|
|
|
steps:
|
2020-05-14 13:31:01 -07:00
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: cargo fetch
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fetch
|
2020-08-18 11:08:53 -07:00
|
|
|
- name: install LLVM on Windows
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: choco install llvm -y
|
2020-05-14 13:31:01 -07:00
|
|
|
- name: Run tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --verbose --all
|
2020-08-14 16:51:03 -07:00
|
|
|
|
|
|
|
build:
|
|
|
|
name: Build on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2020-08-18 11:08:53 -07:00
|
|
|
- name: install LLVM on Windows
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
run: choco install llvm -y
|
2020-08-14 16:51:03 -07:00
|
|
|
- name: cargo fetch
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fetch
|
2020-05-14 13:31:01 -07:00
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --verbose --release
|
2020-01-23 13:40:32 -08:00
|
|
|
|
2020-04-21 01:51:05 -07:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
2020-01-24 12:09:01 -08:00
|
|
|
with:
|
2020-05-15 20:15:35 -07:00
|
|
|
toolchain: nightly
|
|
|
|
components: clippy
|
2020-04-21 01:51:05 -07:00
|
|
|
override: true
|
2020-02-04 21:34:38 -08:00
|
|
|
- name: Run clippy
|
2020-06-16 13:44:32 -07:00
|
|
|
uses: actions-rs/clippy-check@v1
|
2020-02-04 21:34:38 -08:00
|
|
|
with:
|
2020-06-16 13:44:32 -07:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2020-07-07 16:26:22 -07:00
|
|
|
args: --all-features --all-targets -- -D warnings
|
2020-05-27 19:12:25 -07:00
|
|
|
|
|
|
|
fmt:
|
|
|
|
name: Rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
2020-07-24 14:36:59 -07:00
|
|
|
|
|
|
|
coverage:
|
2020-07-24 15:43:56 -07:00
|
|
|
name: Coverage
|
2020-07-24 14:36:59 -07:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- name: Run cargo-tarpaulin
|
|
|
|
uses: actions-rs/tarpaulin@v0.1
|
|
|
|
with:
|
|
|
|
version: 'latest'
|
|
|
|
timeout: 600
|
|
|
|
- name: Upload coverage report to Codecov
|
2020-08-18 02:00:39 -07:00
|
|
|
uses: codecov/codecov-action@v1.0.13
|