Add Github Actions CI

This commit is contained in:
Leo Le Bouter 2020-04-21 13:57:40 +02:00
parent b1c738b412
commit 05c90e6bca
No known key found for this signature in database
GPG Key ID: 45A8B1E86BCD10A6
4 changed files with 135 additions and 0 deletions

88
.github/workflows/build-and-test.yaml vendored Normal file
View File

@ -0,0 +1,88 @@
name: Build and test
on: [push]
jobs:
stable:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Instal LLVM
run: choco install -y llvm
if: runner.os == 'Windows'
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
beta:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install latest beta
uses: actions-rs/toolchain@v1
with:
toolchain: beta
override: true
- name: Instal LLVM
run: choco install -y llvm
if: runner.os == 'Windows'
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
nightly:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Instal LLVM
run: choco install -y llvm
if: runner.os == 'Windows'
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test

21
.github/workflows/coverage.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Code Coverage
on: [push]
jobs:
grcov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- 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'
- uses: actions-rs/grcov@v0.1

14
.github/workflows/lint.yaml vendored Normal file
View File

@ -0,0 +1,14 @@
name: Lint
on: [push]
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features

12
.github/workflows/security.yaml vendored Normal file
View File

@ -0,0 +1,12 @@
name: Security audit
on: [push]
jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}