1
- name : Spell Check, C++/CUDA/Go/RUST & Examples
1
+ name : C++/CUDA/Go/RUST
2
2
3
3
on :
4
4
pull_request :
31
31
name : Check Code Format
32
32
runs-on : ubuntu-22.04
33
33
needs : check-changed-files
34
+ container :
35
+ image : silkeh/clang:19-bookworm # Replace with a container having the desired clang-format version
34
36
steps :
35
37
- name : Checkout
36
38
uses : actions/checkout@v4
41
43
go-version : ' 1.22.0'
42
44
- name : Check clang-format
43
45
if : needs.check-changed-files.outputs.cpp == 'true'
44
- run : ./scripts/format_all.sh . --check --exclude "build|wrappers"
46
+ run : |
47
+ clang-format --version
48
+ ./scripts/format_all.sh . --check --exclude "build|wrappers"
45
49
- name : Check gofmt
46
50
if : needs.check-changed-files.outputs.golang == 'true'
47
51
run : if [[ $(go list ./... | xargs go fmt) ]]; then echo "Please run go fmt"; exit 1; fi
@@ -82,23 +86,23 @@ jobs:
82
86
- name : Checkout Repo
83
87
uses : actions/checkout@v4
84
88
- name : Checkout CUDA Backend
85
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
89
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
86
90
uses : actions/checkout@v4
87
91
with :
88
92
repository : ingonyama-zk/icicle-cuda-backend
89
93
path : ./icicle/backend/cuda
90
94
ssh-key : ${{ secrets.CUDA_PULL_KEY }}
91
95
ref : ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
92
96
- name : Get CUDA Backend Commit SHA
93
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
97
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
94
98
working-directory : ./icicle/backend/cuda
95
99
id : extract-cuda-sha
96
100
run : |
97
101
CUDA_BACKEND_SHA=$(git rev-parse HEAD)
98
102
echo "CUDA Backend Commit SHA: $CUDA_BACKEND_SHA"
99
103
echo "cuda-backend-sha=$CUDA_BACKEND_SHA" >> $GITHUB_OUTPUT
100
104
- name : Set CUDA backend flag
101
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
105
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
102
106
id : cuda-flag
103
107
run : |
104
108
CUDA_BACKEND_SHA=${{ steps.extract-cuda-sha.outputs.cuda-backend-sha }}
@@ -136,33 +140,17 @@ jobs:
136
140
echo "CMAKE_INSTALL_PREFIX=-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}" >> $GITHUB_OUTPUT
137
141
echo "ICICLE_BACKEND_INSTALL_DIR=${INSTALL_PATH}/lib" >> $GITHUB_OUTPUT
138
142
fi
139
- - name : Setup go
140
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
141
- timeout-minutes : 15
142
- uses : actions/setup-go@v5
143
- with :
144
- go-version : ' 1.22.0'
145
143
146
144
- name : Build curve
147
145
working-directory : ./icicle
148
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
146
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
149
147
run : |
150
148
mkdir -p build && rm -rf build/*
151
149
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCURVE=${{ matrix.curve.name }} ${{ matrix.curve.build_args }} ${{ steps.cuda-flag.outputs.CUDA_FLAG }} ${{ steps.cuda-flag.outputs.CMAKE_INSTALL_PREFIX }} -S . -B build
152
150
cmake --build build --target install -j
153
151
rm -rf ${{ steps.cuda-flag.outputs.INSTALL_PATH }}/lib/gh_commit_sha_${{ matrix.curve.name }}*
154
152
touch ${{ steps.cuda-flag.outputs.COMMIT_FILE_PATH }}
155
- - name : Run RUST Curve Tests
156
- working-directory : ./wrappers/rust/icicle-curves
157
- if : needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp == 'true'
158
- run : |
159
- CURVE=${{ matrix.curve.name }}
160
- CURVE_DIR=icicle-${CURVE//_/-}
161
- export ICICLE_BACKEND_INSTALL_DIR=${{ steps.cuda-flag.outputs.INSTALL_PATH }}
162
- cd ./$CURVE_DIR
163
- cargo test --release --verbose -- --skip phase
164
- cargo test phase2 --release
165
- cargo test phase3 --release
153
+
166
154
- name : Run C++ Curve Tests
167
155
working-directory : ./icicle/build/tests
168
156
if : needs.check-changed-files.outputs.cpp == 'true'
@@ -183,6 +171,23 @@ jobs:
183
171
cd -
184
172
fi
185
173
done
174
+ - name : Run RUST Curve Tests
175
+ working-directory : ./wrappers/rust/icicle-curves
176
+ if : needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp == 'true'
177
+ run : |
178
+ CURVE=${{ matrix.curve.name }}
179
+ CURVE_DIR=icicle-${CURVE//_/-}
180
+ export ICICLE_BACKEND_INSTALL_DIR=${{ steps.cuda-flag.outputs.INSTALL_PATH }}
181
+ cd ./$CURVE_DIR
182
+ cargo test --release --verbose -- --skip phase
183
+ cargo test phase2 --release
184
+ cargo test phase3 --release
185
+ - name : Setup go
186
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
187
+ timeout-minutes : 15
188
+ uses : actions/setup-go@v5
189
+ with :
190
+ go-version : ' 1.22.0'
186
191
- name : Run Golang curve Tests
187
192
working-directory : ./wrappers/golang/curves
188
193
if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
@@ -214,23 +219,23 @@ jobs:
214
219
- name : Checkout Repo
215
220
uses : actions/checkout@v4
216
221
- name : Checkout CUDA Backend
217
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
222
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
218
223
uses : actions/checkout@v4
219
224
with :
220
225
repository : ingonyama-zk/icicle-cuda-backend
221
226
path : ./icicle/backend/cuda
222
227
ssh-key : ${{ secrets.CUDA_PULL_KEY }}
223
228
ref : ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
224
229
- name : Get CUDA Backend Commit SHA
225
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
230
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
226
231
working-directory : ./icicle/backend/cuda
227
232
id : extract-cuda-sha
228
233
run : |
229
234
CUDA_BACKEND_SHA=$(git rev-parse HEAD)
230
235
echo "CUDA Backend Commit SHA: $CUDA_BACKEND_SHA"
231
236
echo "cuda-backend-sha=$CUDA_BACKEND_SHA" >> $GITHUB_OUTPUT
232
237
- name : Set CUDA backend flag
233
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
238
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
234
239
id : cuda-flag
235
240
run : |
236
241
CUDA_BACKEND_SHA=${{ steps.extract-cuda-sha.outputs.cuda-backend-sha }}
@@ -268,12 +273,6 @@ jobs:
268
273
echo "CMAKE_INSTALL_PREFIX=-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}" >> $GITHUB_OUTPUT
269
274
echo "ICICLE_BACKEND_INSTALL_DIR=${INSTALL_PATH}/lib" >> $GITHUB_OUTPUT
270
275
fi
271
- - name : Setup go
272
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
273
- timeout-minutes : 15
274
- uses : actions/setup-go@v5
275
- with :
276
- go-version : ' 1.22.0'
277
276
278
277
- name : Build field
279
278
working-directory : ./icicle
@@ -284,17 +283,7 @@ jobs:
284
283
cmake --build build --target install -j
285
284
rm -rf ${{ steps.cuda-flag.outputs.INSTALL_PATH }}/lib/gh_commit_sha_${{ matrix.field.name }}*
286
285
touch ${{ steps.cuda-flag.outputs.COMMIT_FILE_PATH }}
287
- - name : Run RUST Field Tests
288
- working-directory : ./wrappers/rust/icicle-fields
289
- if : needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp == 'true'
290
- run : |
291
- FIELD=${{ matrix.field.name }}
292
- FIELD_DIR=icicle-${FIELD//_/-}
293
- export ICICLE_BACKEND_INSTALL_DIR=${{ steps.cuda-flag.outputs.INSTALL_PATH }}
294
- cd ./$FIELD_DIR
295
- cargo test --release --verbose -- --skip phase
296
- cargo test phase2 --release
297
- cargo test phase3 --release
286
+
298
287
- name : Run C++ field Tests
299
288
working-directory : ./icicle/build/tests
300
289
if : needs.check-changed-files.outputs.cpp == 'true'
@@ -317,6 +306,24 @@ jobs:
317
306
fi
318
307
done
319
308
309
+ - name : Run RUST Field Tests
310
+ working-directory : ./wrappers/rust/icicle-fields
311
+ if : needs.check-changed-files.outputs.rust == 'true' || needs.check-changed-files.outputs.cpp == 'true'
312
+ run : |
313
+ FIELD=${{ matrix.field.name }}
314
+ FIELD_DIR=icicle-${FIELD//_/-}
315
+ export ICICLE_BACKEND_INSTALL_DIR=${{ steps.cuda-flag.outputs.INSTALL_PATH }}
316
+ cd ./$FIELD_DIR
317
+ cargo test --release --verbose -- --skip phase
318
+ cargo test phase2 --release
319
+ cargo test phase3 --release
320
+
321
+ - name : Setup go
322
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
323
+ timeout-minutes : 15
324
+ uses : actions/setup-go@v5
325
+ with :
326
+ go-version : ' 1.22.0'
320
327
- name : Run Golang field Tests
321
328
working-directory : ./wrappers/golang/fields
322
329
if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
@@ -343,23 +350,23 @@ jobs:
343
350
- name : Checkout Repo
344
351
uses : actions/checkout@v4
345
352
- name : Checkout CUDA Backend
346
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
353
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
347
354
uses : actions/checkout@v4
348
355
with :
349
356
repository : ingonyama-zk/icicle-cuda-backend
350
357
path : ./icicle/backend/cuda
351
358
ssh-key : ${{ secrets.CUDA_PULL_KEY }}
352
359
ref : ${{ needs.extract-cuda-backend-branch.outputs.cuda-backend-branch }}
353
360
- name : Get CUDA Backend Commit SHA
354
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
361
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
355
362
working-directory : ./icicle/backend/cuda
356
363
id : extract-cuda-sha
357
364
run : |
358
365
CUDA_BACKEND_SHA=$(git rev-parse HEAD)
359
366
echo "CUDA Backend Commit SHA: $CUDA_BACKEND_SHA"
360
367
echo "cuda-backend-sha=$CUDA_BACKEND_SHA" >> $GITHUB_OUTPUT
361
368
- name : Set CUDA backend flag
362
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
369
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true' || needs.check-changed-files.outputs.rust == 'true'
363
370
id : cuda-flag
364
371
run : |
365
372
CUDA_BACKEND_SHA=${{ steps.extract-cuda-sha.outputs.cuda-backend-sha }}
@@ -396,12 +403,6 @@ jobs:
396
403
echo "CMAKE_INSTALL_PREFIX=-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH}" >> $GITHUB_OUTPUT
397
404
echo "ICICLE_BACKEND_INSTALL_DIR=${INSTALL_PATH}/lib" >> $GITHUB_OUTPUT
398
405
fi
399
- - name : Setup go
400
- if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
401
- timeout-minutes : 15
402
- uses : actions/setup-go@v5
403
- with :
404
- go-version : ' 1.22.0'
405
406
- name : Build
406
407
working-directory : ./icicle
407
408
if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
@@ -420,6 +421,12 @@ jobs:
420
421
cargo test --release --verbose -- --skip phase
421
422
cargo test phase2 --release
422
423
cargo test phase3 --release
424
+ - name : Setup go
425
+ if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
426
+ timeout-minutes : 15
427
+ uses : actions/setup-go@v5
428
+ with :
429
+ go-version : ' 1.22.0'
423
430
- name : Test GoLang Hashes
424
431
working-directory : ./wrappers/golang/hash
425
432
if : needs.check-changed-files.outputs.golang == 'true' || needs.check-changed-files.outputs.cpp == 'true'
0 commit comments