forked from rust-lang/polonius
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.4 KB
/
Copy pathci.yml
File metadata and controls
86 lines (72 loc) · 2.4 KB
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
76
77
78
79
80
81
82
83
84
85
86
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]
features: [[], ['polonius-souffle']]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Souffle
if: contains(matrix.features, 'polonius-souffle')
run: |
wget https://github.com/ecstatic-morse/souffle/releases/download/2.0.2-alpha/souffle-2.0.2-Linux.deb
sudo apt install ./souffle-2.0.2-Linux.deb
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Build polonius
run: cargo build --features "${{ join(matrix.features) }}"
- name: Execute tests for all crates in the workspace (except `polonius-souffle`)
run: cargo test --all --exclude polonius-souffle --features "${{ join(matrix.features) }}"
- name: Execute tests for `polonius-souffle`
if: contains(matrix.features, 'polonius-souffle')
run: cargo test -p polonius-souffle