-
Notifications
You must be signed in to change notification settings - Fork 34
128 lines (107 loc) · 3.5 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Rust
on:
push:
branches: ["*"]
pull_request:
branches: ["*"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
wakeup:
if: github.event.pull_request.head.repo.full_name == 'summa-dev/summa-solvency'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::490752553772:role/summa-solvency-ec2-slc
role-duration-seconds: 900
aws-region: us-west-2
- name: Wakeup runner
run: .github/scripts/wakeup.sh
build:
if: github.event.pull_request.head.repo.full_name == 'summa-dev/summa-solvency'
runs-on: [summa-solvency-runner]
needs: [wakeup]
steps:
- uses: actions/checkout@v3
- name: Set Environment
run: echo "PATH=/home/ubuntu/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> "$GITHUB_ENV"
- name: Install solc
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.20 && solc --version
- name: Test Zk Prover
run: |
cd zk_prover
cargo test --release --features dev-graph -- --nocapture
- name: Test Zk Prover examples
run: |
cd zk_prover
cargo run --release --example gen_inclusion_verifier
cargo run --release --example gen_commitment
cargo run --release --example gen_inclusion_proof
cargo run --release --example nova_incremental_verifier
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Test backend
run: |
cd backend
cargo test --release -- --nocapture
- name: Test backend example
run: |
cd backend
cargo run --release --example summa_solvency_flow
test-zk-prover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test Zk Prover
run: |
cd zk_prover
cargo test --release --features dev-graph -- --nocapture
test-zk-prover-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install solc
run: (hash svm 2>/dev/null || cargo install --version 0.2.23 svm-rs) && svm install 0.8.20 && solc --version
- name: Test Zk Prover examples
run: |
cd zk_prover
cargo run --release --example gen_inclusion_verifier
cargo run --release --example gen_commitment
cargo run --release --example gen_inclusion_proof
test-zk-prover-examples-nova:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Test Zk Prover examples
run: |
cd zk_prover
cargo run --release --example nova_incremental_verifier
test-backend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Test backend
run: |
cd backend
cargo test --release -- --nocapture
test-backend-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Test backend example
run: |
cd backend
cargo run --release --example summa_solvency_flow