|
| 1 | +on: [push] |
| 2 | + |
| 3 | +jobs: |
| 4 | + build_and_test: |
| 5 | + name: Build and test on ${{ matrix.os }} |
| 6 | + runs-on: ${{ matrix.os }} |
| 7 | + strategy: |
| 8 | + matrix: |
| 9 | + os: [ubuntu-latest, windows-latest, macOS-latest] |
| 10 | + |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@master |
| 13 | + |
| 14 | + - name: Install nightly |
| 15 | + uses: actions-rs/toolchain@v1 |
| 16 | + with: |
| 17 | + toolchain: nightly |
| 18 | + override: true |
| 19 | + |
| 20 | + - name: check |
| 21 | + uses: actions-rs/cargo@v1 |
| 22 | + with: |
| 23 | + command: check |
| 24 | + args: --all --benches --bins --examples --tests |
| 25 | + |
| 26 | + - name: check unstable |
| 27 | + uses: actions-rs/cargo@v1 |
| 28 | + with: |
| 29 | + command: check |
| 30 | + args: --features unstable --all --benches --bins --examples --tests |
| 31 | + |
| 32 | + - name: tests |
| 33 | + uses: actions-rs/cargo@v1 |
| 34 | + with: |
| 35 | + command: test |
| 36 | + args: --all --doc --features unstable |
| 37 | + |
| 38 | + check_fmt_and_docs: |
| 39 | + name: Checking fmt and docs |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@master |
| 43 | + |
| 44 | + - name: setup |
| 45 | + run: | |
| 46 | + rustup default nightly |
| 47 | + rustup component add rustfmt |
| 48 | + test -x $HOME/.cargo/bin/mdbook || ./ci/install-mdbook.sh |
| 49 | + rustc --version |
| 50 | + - name: mdbook |
| 51 | + run: | |
| 52 | + mdbook build docs |
| 53 | + - name: fmt |
| 54 | + run: cargo fmt --all -- --check |
| 55 | + |
| 56 | + - name: Docs |
| 57 | + run: cargo doc --features docs,unstable |
0 commit comments