2019-10-07 15:15:41 +03:00
|
|
|
name: Build (MacOS, Linux, Windows)
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
2019-10-07 19:59:19 +03:00
|
|
|
|
|
|
|
# Please check if all components are available before updating the rust toolchain version.
|
|
|
|
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
|
|
|
|
|
|
|
|
|
2019-10-07 19:31:07 +03:00
|
|
|
|
2019-10-07 15:15:41 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
2019-10-07 18:01:11 +03:00
|
|
|
name: Build Check
|
2019-10-07 15:15:41 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
|
|
steps:
|
2019-10-07 17:19:06 +03:00
|
|
|
- uses: actions/checkout@v1
|
2019-10-07 15:45:49 +03:00
|
|
|
- name: Install Rust Nightly Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-07 19:59:19 +03:00
|
|
|
toolchain: nightly-2019-10-03
|
2019-10-07 15:45:49 +03:00
|
|
|
override: true
|
|
|
|
- name: Run cargo check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2019-10-07 18:01:11 +03:00
|
|
|
|
|
|
|
test:
|
|
|
|
name: Test Suite
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-07 19:59:19 +03:00
|
|
|
toolchain: nightly-2019-10-03
|
2019-10-07 18:01:11 +03:00
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
name: Code Formatting Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-07 19:59:19 +03:00
|
|
|
toolchain: nightly-2019-10-03
|
2019-10-07 18:01:11 +03:00
|
|
|
override: true
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
name: Code Linting Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-07 19:59:19 +03:00
|
|
|
toolchain: nightly-2019-10-03
|
2019-10-07 18:01:11 +03:00
|
|
|
override: true
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: -- -D warnings
|
2019-10-07 17:19:06 +03:00
|
|
|
|
|
|
|
coverage:
|
2019-10-07 18:01:11 +03:00
|
|
|
name: Code Coverage Check
|
2019-10-07 17:19:06 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install Rust Nightly Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-10-07 19:59:19 +03:00
|
|
|
toolchain: nightly-2019-10-03
|
2019-10-07 17:19:06 +03:00
|
|
|
override: true
|
|
|
|
- name: Generate test profile
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --all-features --no-fail-fast
|
|
|
|
env:
|
|
|
|
'CARGO_INCREMENTAL': '0'
|
|
|
|
'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
|
|
|
|
- name: Generate coverage report
|
|
|
|
uses: actions-rs/grcov@v0.1
|
2019-10-07 19:36:06 +03:00
|
|
|
- name: What was the file 1?
|
|
|
|
run: echo "It was ${{ jobs.coverage.outputs.report }}"
|
|
|
|
- name: What was the file 2?
|
|
|
|
run: echo "It was ${{ outputs.report }}"
|
2019-10-07 17:53:07 +03:00
|
|
|
- name: What was in the file?
|
|
|
|
run: cat ./lcov.info
|
2019-10-07 17:19:06 +03:00
|
|
|
- name: Upload coverage report
|
|
|
|
uses: codecov/codecov-action@v1.0.2
|
|
|
|
with:
|
|
|
|
token: 70c0d44d-6ee2-4f23-b16b-0ed801149f8a
|
2019-10-07 17:53:07 +03:00
|
|
|
file: ./lcov.info
|