enso/gui/.github/workflows/build.yml

96 lines
2.5 KiB
YAML
Raw Normal View History

name: Build (MacOS, Linux, Windows)
on: [push]
# 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
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-03
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-03
override: true
- uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-03
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-03
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Rust Nightly Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2019-10-03
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
id: coverage
uses: actions-rs/grcov@v0.1
- name: Upload coverage report
uses: codecov/codecov-action@v1.0.2
with:
token: 70c0d44d-6ee2-4f23-b16b-0ed801149f8a
file: ${{ steps.coverage.outputs.report }}