• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on: [push, pull_request]
4
5env:
6  RUSTFLAGS: -Dwarnings
7
8jobs:
9  fmt_and_docs:
10    name: Check fmt & build docs
11    runs-on: ubuntu-latest
12    steps:
13      - uses: actions/checkout@v1
14      - name: Install Rust
15        uses: actions-rs/toolchain@v1
16        with:
17          profile: minimal
18          toolchain: stable
19          components: rustfmt
20          override: true
21      - name: rustfmt
22        run: cargo fmt --all -- --check
23      - name: docs
24        run: cargo doc --no-deps
25
26  build_and_test:
27    name: Build & Test
28    runs-on: ${{ matrix.os }}
29    strategy:
30      matrix:
31        rust: [1.56.0, stable]
32        os: [ubuntu-latest, macOS-latest, windows-latest]
33
34    steps:
35      - uses: actions/checkout@v1
36      - name: Install Rust
37        uses: actions-rs/toolchain@v1
38        with:
39          profile: minimal
40          toolchain: ${{ matrix.rust }}
41          components: clippy
42          override: true
43      - name: Clippy
44        run: cargo clippy --all -- -D warnings
45      - name: Run tests
46        if: matrix.rust == 'stable'
47        run: cargo test --all --verbose --features fancy
48      - name: Run tests
49        if: matrix.rust == '1.56.0'
50        run: cargo test --all --verbose --features fancy no-format-args-capture
51
52  miri:
53    name: Miri
54    runs-on: ubuntu-latest
55
56    steps:
57      - uses: actions/checkout@v1
58      - name: Install Rust
59        uses: actions-rs/toolchain@v1
60        with:
61          profile: minimal
62          toolchain: nightly
63          components: miri,rust-src
64          override: true
65      - name: Run tests with miri
66        env:
67          MIRIFLAGS: -Zmiri-disable-isolation -Zmiri-strict-provenance
68        run: cargo miri test --all --verbose --features fancy
69
70  minimal_versions:
71    name: Minimal versions check
72    runs-on: ${{ matrix.os }}
73    strategy:
74      matrix:
75        os: [ubuntu-latest, macOS-latest, windows-latest]
76
77    steps:
78      - uses: actions/checkout@v1
79      - name: Install Rust
80        uses: actions-rs/toolchain@v1
81        with:
82          profile: minimal
83          toolchain: nightly
84          override: true
85      - name: Run minimal version build
86        run: cargo build -Z minimal-versions --all-features
87
88