• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  pull_request:
5  push:
6    branches:
7      - master
8
9env:
10  RUSTFLAGS: -Dwarnings
11
12jobs:
13  build_and_test:
14    name: Build and test
15    runs-on: ${{ matrix.os }}
16    strategy:
17      matrix:
18        os: [ubuntu-latest, macOS-latest, windows-latest]
19        rust: [stable, 1.34.0]
20
21    steps:
22    - uses: actions/checkout@master
23
24    - name: Install ${{ matrix.rust }}
25      uses: actions-rs/toolchain@v1
26      with:
27        toolchain: ${{ matrix.rust }}
28        override: true
29
30    - name: check
31      uses: actions-rs/cargo@v1
32      with:
33        command: check
34        args: --all --bins --examples
35
36    - name: tests
37      uses: actions-rs/cargo@v1
38      with:
39        command: test
40        args: --all
41
42  check_fmt_and_docs:
43    name: Checking fmt and docs
44    runs-on: ubuntu-latest
45    steps:
46    - uses: actions/checkout@master
47    - uses: actions-rs/toolchain@v1
48      with:
49        toolchain: nightly
50        components: rustfmt, clippy
51        override: true
52
53    - name: fmt
54      run: cargo fmt --all -- --check
55
56    - name: Docs
57      run: cargo doc