-
Notifications
You must be signed in to change notification settings - Fork 50
101 lines (96 loc) · 3.03 KB
/
rust.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Rust fmt
run: |
shopt -s globstar
rustfmt **/*.rs --check
contracts-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-contracts-${{ hashFiles('creusot-contracts/Cargo.lock') }}
- name: Build creusot-contracts with rustc
run: cargo build -p creusot-contracts
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build
- name: Run tests
run: cargo test
why3:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: ${{ github.event.pull_request.commits }}
- name: Fetch target branch
if: github.base_ref
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/${{github.base_ref}}:refs/remotes/origin/${{github.base_ref}}
- name: Install CVC4
run: sudo apt-get install -y cvc4=1.8-2
- name: Install CVC5
run: |
wget https://github.com/cvc5/cvc5/releases/download/cvc5-1.0.5/cvc5-Linux
sudo cp cvc5-Linux /usr/local/bin/cvc5
sudo chmod +x /usr/local/bin/cvc5
- name: Install Z3
run: |
wget https://github.com/Z3Prover/z3/releases/download/z3-4.12.1/z3-4.12.1-x64-glibc-2.35.zip
unzip z3-4.12.1-x64-glibc-2.35.zip
sudo cp -rn z3-4.12.1-x64-glibc-2.35/bin /usr/local
sudo cp -rn z3-4.12.1-x64-glibc-2.35/include /usr/local
sudo chmod +x /usr/local/bin/z3
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: dawidd6/action-download-artifact@v2
with:
workflow: why3.yml
name: why3
path: /home/runner/work/creusot/why3
- run: |
chmod -R +x ~/work/creusot/why3/bin
chmod -R +x ~/work/creusot/why3/lib/why3/why3server
mv ~/work/creusot/why3/alt-ergo /usr/local/bin/alt-ergo
chmod +x /usr/local/bin/alt-ergo
echo $(/usr/local/bin/alt-ergo --version)
~/work/creusot/why3/bin/why3 config detect
cat ~/.why3.conf
- run: cargo test --test why3 "" -- --replay=none --diff-from=origin/master
env:
WHY3_CONFIG: ${{ github.workspace }}/ci/why.conf
WHY3_PATH: ${{ github.workspace }}/../why3/bin/why3
- run: cargo test --test why3 "" -- --skip-unstable
env:
WHY3_CONFIG: ${{ github.workspace }}/ci/why.conf
WHY3_PATH: ${{ github.workspace }}/../why3/bin/why3