-
Notifications
You must be signed in to change notification settings - Fork 48
92 lines (80 loc) · 2.6 KB
/
prover-test.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
name: Test gnark prover
on:
push:
branches:
- main
- "release/**"
paths:
- "prover/server/**"
- ".github/workflows/prover-test.yml"
- ".github/workflows/prover-release.yml"
pull_request:
branches:
- "*"
paths:
- "prover/server/**"
- ".github/workflows/prover-test.yml"
- ".github/workflows/prover-release.yml"
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
build-and-test:
if: github.event.pull_request.draft == false
runs-on: buildjet-4vcpu-ubuntu-2204
timeout-minutes: 120
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: "./prover/server/go.mod"
- name: Install Elan
run: |
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y -v --default-toolchain leanprover/lean4:v4.2.0
echo "LAKE_VERSION=$(~/.elan/bin/lake --version)" >> "$GITHUB_ENV"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: prover/server/formal-verification/lake-packages
key: "${{ env.LAKE_VERSION }}"
- name: Download keys for lightweight tests
if: ${{ github.event.pull_request.base.ref == 'main' }}
run: |
cd prover/server
./scripts/download_keys.sh light
- name: Download keys for full tests
if: ${{ github.event.pull_request.base.ref == 'release' }}
run: |
cd prover/server
./scripts/download_keys.sh full
- name: Build
run: |
cd prover/server
go build
- name: Unit tests
run: |
cd prover/server
go test ./prover -timeout 60m
- name: Lightweight integration tests
if: ${{ github.event.pull_request.base.ref == 'main' }}
run: |
cd prover/server
go test -run TestLightweight -timeout 15m
- name: Full integration tests
if: ${{ github.event.pull_request.base.ref == 'release' }}
run: |
cd prover/server
go test -run TestFull -timeout 120m
# - name: Extract circuit to Lean
# run: |
# cd prover/server
# ./light-prover extract-circuit --output formal-verification/FormalVerification/Circuit.lean --tree-height=26 --compressed-accounts=8
# - name: Build lean project
# run: |
# cd prover/server/formal-verification
# ~/.elan/bin/lake exe cache get
# ~/.elan/bin/lake build