-
Notifications
You must be signed in to change notification settings - Fork 37
44 lines (41 loc) · 1.46 KB
/
setup.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
name: Setup env
on:
workflow_call:
jobs:
setup:
- uses: actions/checkout@v4
- name: Install Rust toolchain 1.77
uses: actions-rs/toolchain@v1
with:
toolchain: "1.77"
override: true
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install snarkjs
run: npm install -g snarkjs
- name: Restore toml
uses: actions/cache@v4
id: toml-linux-restore
with:
path: /home/runner/.cargo/bin/toml
key: ${{ runner.os }}-toml-0.2.3 # version of toml-cli 0.2.3
- name: Install circom
run: |
sudo wget -O /Users/runner/.cargo/bin/circom https://github.com/iden3/circom/releases/download/v2.1.9/circom-macos-amd64
sudo chmod +x /Users/runner/.cargo/bin/circom
- name: Get uniffi-version
if: steps.toml-linux-restore.outputs.cache-hit == 'true'
run: echo "UNIFFI_VERSION=$(toml get mopro-ffi/Cargo.toml dependencies.uniffi.version -r)" >> $GITHUB_ENV
- name: Restore uniffi-bindgen
uses: actions/cache@v4
if: steps.toml-linux-restore.outputs.cache-hit == 'true'
id: uniffi-bindgen-linux-restore
with:
path: /home/runner/.cargo/bin/uniffi-bindgen
key: ${{ runner.os }}-uniffi-bindgen-${{ env.UNIFFI_VERSION }}
- name: Install mopro-cli
run: (cd mopro-cli && cargo install --path .)
- name: Prepare CI for Core and FFI
run: ./scripts/prepare_ci.sh