-
Notifications
You must be signed in to change notification settings - Fork 73
75 lines (63 loc) · 1.81 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [ master ]
pull_request:
jobs:
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install rust beta toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: beta
profile: minimal
override: true
components: rustfmt
- name: Check formatting of all crates
run: cargo fmt --all -- --check
book:
name: Build and upload book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install mdbook
run: |
mkdir mdbook
curl -Lf https://github.com/rust-lang/mdBook/releases/download/v0.4.8/mdbook-v0.4.8-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook
echo "$GITHUB_WORKSPACE/mdbook" >> $GITHUB_PATH
- name: Build book
run: mdbook build ./book/
- name: Deploy book to GitHub Pages
uses: rust-lang/simpleinfra/github-actions/static-websites@master
with:
deploy_dir: book/book
github_token: "${{ secrets.github_token }}"
if: github.ref == 'refs/heads/master'
test:
name: Run tests
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
rust: [beta, nightly]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Build polonius
run: cargo build
- name: Execute tests for all crates in the workspace
run: cargo test --all