• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: Build and test
2
3on:
4  push:
5    branches:
6      - master
7  pull_request:
8
9jobs:
10  build_and_test:
11    runs-on: ${{ matrix.os }}
12    strategy:
13      fail-fast: false
14      matrix:
15        os: [ubuntu-latest]
16        rust: [nightly, beta, stable]
17    steps:
18      - uses: actions/checkout@v2
19
20      - name: Install latest ${{ matrix.rust }}
21        uses: actions-rs/toolchain@v1
22        with:
23            toolchain: ${{ matrix.rust }}
24            profile: minimal
25            override: true
26
27      - name: Install valgrind
28        run: |
29          sudo apt-get update
30          sudo apt-get install -y valgrind
31
32      - name: Run cargo check
33        uses: actions-rs/cargo@v1
34        with:
35          command: check
36          args: --all --bins --examples --tests --all-features
37
38      - name: Run cargo check (no_std)
39        uses: actions-rs/cargo@v1
40        with:
41          command: check
42          args: --all --no-default-features
43
44      - name: Run cargo test
45        uses: actions-rs/cargo@v1
46        with:
47          command: test
48          args: -- --test-threads=1
49        env:
50          CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --leak-check=full --error-exitcode=1"
51