51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Build and test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
build_and_test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
rust: [nightly, beta, stable]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install latest ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Install valgrind
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y valgrind
|
|
|
|
- name: Run cargo check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all --bins --examples --tests --all-features
|
|
|
|
- name: Run cargo check (no_std)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
args: --all --no-default-features
|
|
|
|
- name: Run cargo test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: -- --test-threads=1
|
|
env:
|
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1"
|