66 - main
77
88env :
9- TREE_DEPTH : 20
10- ALL_SNARK_ARTIFACTS : false
9+ TREE_DEPTH : 10
1110
1211jobs :
1312 style :
1413 runs-on : ubuntu-latest
1514
1615 steps :
17- - uses : actions/checkout@v2
16+ - uses : actions/checkout@v4
1817
1918 - name : Install Node.js
20- uses : actions/setup-node@v1
19+ uses : actions/setup-node@v4
2120 with :
22- node-version : 16.x
23-
24- - name : Get yarn cache directory path
25- id : yarn-cache-dir-path
26- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
27-
28- - name : Restore yarn cache
29- uses : actions/cache@v3
30- id : yarn-cache
31- with :
32- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
33- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34- restore-keys : |
35- ${{ runner.os }}-yarn-
21+ node-version : 20
22+ cache : yarn
3623
3724 - name : Install dependencies
3825 run : yarn
@@ -56,25 +43,13 @@ jobs:
5643 runs-on : ubuntu-latest
5744
5845 steps :
59- - uses : actions/checkout@v2
46+ - uses : actions/checkout@v4
6047
6148 - name : Install Node.js
62- uses : actions/setup-node@v1
49+ uses : actions/setup-node@v4
6350 with :
64- node-version : 16.x
65-
66- - name : Get yarn cache directory path
67- id : yarn-cache-dir-path
68- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
69-
70- - name : Restore yarn cache
71- uses : actions/cache@v3
72- id : yarn-cache
73- with :
74- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
75- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
76- restore-keys : |
77- ${{ runner.os }}-yarn-
51+ node-version : 20
52+ cache : yarn
7853
7954 - name : Install dependencies
8055 run : yarn
@@ -90,40 +65,37 @@ jobs:
9065 strategy :
9166 matrix :
9267 type :
68+ - circuits
9369 - libraries
9470 - contracts
9571
9672 steps :
97- - uses : actions/checkout@v2
73+ - uses : actions/checkout@v4
9874
9975 - name : Install Node.js
100- uses : actions/setup-node@v1
76+ uses : actions/setup-node@v4
10177 with :
102- node-version : 16.x
78+ node-version : 20
79+ cache : yarn
10380
104- - name : Get yarn cache directory path
105- id : yarn-cache-dir-path
106- run : echo "::set-output name=dir::$(yarn config get cacheFolder)"
81+ # https://github.com/iden3/circuits/blob/8fffb6609ecad0b7bcda19bb908bdb544bdb3cf7/.github/workflows/main.yml#L18-L22
82+ - name : Setup Circom deps
83+ run : sudo apt-get update && sudo apt- get install -y wget nlohmann-json3-dev libgmp-dev nasm g++ build-essential
10784
108- - name : Restore yarn cache
109- uses : actions/cache@v3
110- id : yarn-cache
111- with :
112- path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
113- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
114- restore-keys : |
115- ${{ runner.os }}-yarn-
85+ - name : Setup Circom
86+ run : wget https://github.com/iden3/circom/releases/latest/download/circom-linux-amd64 && sudo mv ./circom-linux-amd64 /usr/bin/circom && sudo chmod +x /usr/bin/circom
11687
11788 - name : Install dependencies
11889 run : yarn
11990
12091 - name : Build libraries
12192 run : yarn build:libraries
12293
123- - name : Test contracts and libraries
94+ - name : Test libraries, contracts and circuits
12495 run : yarn test:${{ matrix.type }}
12596
12697 - name : Coveralls
98+ if : matrix.type != 'circuits'
12799 uses : coverallsapp/github-action@master
128100 with :
129101 github-token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments