9
9
pull_request :
10
10
11
11
jobs :
12
+
12
13
build-linux :
13
14
runs-on : ubuntu-22.04
14
15
steps :
@@ -22,23 +23,52 @@ jobs:
22
23
packages : build-essential cmake m4 nasm
23
24
version : 1.0
24
25
26
+ - name : Setup QEMU to build ARM64 variant
27
+ uses : docker/setup-qemu-action@v3
28
+
29
+ - name : Setup buildx for ARM64 platform
30
+ uses : docker/setup-buildx-action@v3
31
+ with :
32
+ platforms : linux/amd64,linux/arm64
33
+
34
+ - name : Prepare Docker image builder for ARM64
35
+ uses : docker/build-push-action@v6
36
+ env :
37
+ DOCKER_BUILD_SUMMARY : false
38
+ DOCKER_BUILD_RECORD_UPLOAD : false
39
+ with :
40
+ push : false
41
+ outputs : type=docker
42
+ platforms : linux/arm64
43
+ file : .github/images/Dockerfile.build
44
+ context : ./.github/images/context.build
45
+ cache-from : type=gha,scope=buildkit-arm64
46
+ cache-to : type=gha,mode=max,scope=buildkit-arm64
47
+ tags : builder:arm64
48
+
25
49
- name : Cache gmp build
26
50
uses : actions/cache@v4
27
51
with :
28
52
path : |
29
53
depends/gmp
30
54
depends/gmp-6.2.1.tar.xz
31
- key : ${{ runner.os }}-gmp-${{ hashFiles('build_gmp.sh') }}-2
55
+ key : ${{ runner.os }}-gmp-${{ hashFiles('build_gmp.sh') }}-4
32
56
33
- - name : build gmp for Android arm64
57
+ - name : Build gmp for Android arm64
34
58
run : if [[ ! -d "depends/gmp/package_android_arm64" ]]; then ./build_gmp.sh android; fi
35
59
36
- - name : build gmp for Android x86_64
60
+ - name : Build gmp for Android x86_64
37
61
run : if [[ ! -d "depends/gmp/package_android_x86_64" ]]; then ./build_gmp.sh android_x86_64; fi
38
62
39
- - name : build gmp for Linux x86_64
63
+ - name : Build gmp for Linux x86_64
40
64
run : if [[ ! -d "depends/gmp/package" ]]; then ./build_gmp.sh host; fi
41
65
66
+ - name : Build gmp for Linux arm64
67
+ run : |
68
+ if [[ ! -d "depends/gmp/package_aarch64" ]]; then
69
+ docker run --rm --platform=linux/arm64 -i -v $PWD:/work --workdir=/work builder:arm64 ./build_gmp.sh aarch64
70
+ fi
71
+
42
72
- name : Build prover Android ARM64
43
73
run : |
44
74
mkdir -p build_prover_android && cd build_prover_android
@@ -63,14 +93,33 @@ jobs:
63
93
cmake .. -DTARGET_PLATFORM=ANDROID_x86_64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package_android_openmp_x86_64 -DBUILD_TESTS=OFF -DUSE_OPENMP=ON
64
94
make -j4 && make install
65
95
66
- - name : Build prover Linux
96
+ - name : Build prover Linux x86_64
67
97
run : |
68
98
mkdir -p build_prover && cd build_prover
69
99
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package
70
100
make -j4 && make install
71
101
ctest --rerun-failed --output-on-failure
72
102
73
- - name : test rapidsnark
103
+ - name : Build prover Linux x86_64 noasm
104
+ run : |
105
+ mkdir -p build_prover_noasm && cd build_prover_noasm
106
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package_noasm -DUSE_ASM=NO
107
+ make -j4 && make install
108
+ ctest --rerun-failed --output-on-failure
109
+
110
+ - name : Build prover Linux arm64
111
+ run : |
112
+ docker run --rm --platform=linux/arm64 -i -v $PWD:/work --workdir=/work builder:arm64 bash -c "$(cat << 'EOF'
113
+ set -x
114
+ set -e
115
+ mkdir -p build_prover_arm64 && cd build_prover_arm64
116
+ cmake .. -DTARGET_PLATFORM=aarch64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../package_arm64
117
+ make -j4 && make install
118
+ ctest --rerun-failed --output-on-failure
119
+ EOF
120
+ )"
121
+
122
+ - name : Test rapidsnark
74
123
run : |
75
124
set -x
76
125
set -e
@@ -84,16 +133,34 @@ jobs:
84
133
set -e
85
134
[ $exit_code -ne 0 ]
86
135
87
- - name : upload Linux amd64 dev artifacts
136
+ - name : Upload Linux x86_64 dev artifacts
88
137
if : github.event_name != 'release'
89
138
uses : actions/upload-artifact@v4
90
139
with :
91
- name : rapidsnark-linux-amd64
140
+ name : rapidsnark-linux-x86_64
92
141
path : |
93
142
package
94
143
if-no-files-found : error
95
144
96
- - name : upload Android dev artifacts
145
+ - name : Upload Linux x86_64 noasm dev artifacts
146
+ if : github.event_name != 'release'
147
+ uses : actions/upload-artifact@v4
148
+ with :
149
+ name : rapidsnark-linux-x86_64-noasm
150
+ path : |
151
+ package_noasm
152
+ if-no-files-found : error
153
+
154
+ - name : Upload Linux arm64 dev artifacts
155
+ if : github.event_name != 'release'
156
+ uses : actions/upload-artifact@v4
157
+ with :
158
+ name : rapidsnark-linux-arm64
159
+ path : |
160
+ package_arm64
161
+ if-no-files-found : error
162
+
163
+ - name : Upload Android dev artifacts
97
164
if : github.event_name != 'release'
98
165
uses : actions/upload-artifact@v4
99
166
with :
@@ -102,7 +169,7 @@ jobs:
102
169
package_android
103
170
if-no-files-found : error
104
171
105
- - name : upload Android dev artifacts
172
+ - name : Upload Android dev artifacts
106
173
if : github.event_name != 'release'
107
174
uses : actions/upload-artifact@v4
108
175
with :
@@ -111,7 +178,7 @@ jobs:
111
178
package_android_openmp
112
179
if-no-files-found : error
113
180
114
- - name : upload Android x86_64 dev artifacts
181
+ - name : Upload Android x86_64 dev artifacts
115
182
if : github.event_name != 'release'
116
183
uses : actions/upload-artifact@v4
117
184
with :
@@ -120,7 +187,7 @@ jobs:
120
187
package_android_x86_64
121
188
if-no-files-found : error
122
189
123
- - name : upload Android x86_64 dev artifacts (with OpenMP)
190
+ - name : Upload Android x86_64 dev artifacts (with OpenMP)
124
191
if : github.event_name != 'release'
125
192
uses : actions/upload-artifact@v4
126
193
with :
@@ -129,7 +196,7 @@ jobs:
129
196
package_android_openmp_x86_64
130
197
if-no-files-found : error
131
198
132
- - name : upload Android ARM64 release artifacts
199
+ - name : Upload Android ARM64 release artifacts
133
200
if : github.event_name == 'release'
134
201
env :
135
202
GH_TOKEN : ${{ github.token }}
@@ -140,7 +207,7 @@ jobs:
140
207
zip -r rapidsnark-android-arm64-${{ github.ref_name }}.zip rapidsnark-android-arm64-${{ github.ref_name }}
141
208
gh release upload ${{ github.event.release.tag_name }} rapidsnark-android-arm64-${{ github.ref_name }}.zip
142
209
143
- - name : upload Android x86_64 release artifacts
210
+ - name : Upload Android x86_64 release artifacts
144
211
if : github.event_name == 'release'
145
212
env :
146
213
GH_TOKEN : ${{ github.token }}
@@ -151,7 +218,7 @@ jobs:
151
218
zip -r rapidsnark-android-x86_64-${{ github.ref_name }}.zip rapidsnark-android-x86_64-${{ github.ref_name }}
152
219
gh release upload ${{ github.event.release.tag_name }} rapidsnark-android-x86_64-${{ github.ref_name }}.zip
153
220
154
- - name : upload Linux x86_64 release artifacts
221
+ - name : Upload Linux x86_64 release artifacts
155
222
if : github.event_name == 'release'
156
223
env :
157
224
GH_TOKEN : ${{ github.token }}
@@ -162,8 +229,30 @@ jobs:
162
229
zip -r rapidsnark-linux-x86_64-${{ github.ref_name }}.zip rapidsnark-linux-x86_64-${{ github.ref_name }}
163
230
gh release upload ${{ github.event.release.tag_name }} rapidsnark-linux-x86_64-${{ github.ref_name }}.zip
164
231
232
+ - name : Upload Linux x86_64 noasm release artifacts
233
+ if : github.event_name == 'release'
234
+ env :
235
+ GH_TOKEN : ${{ github.token }}
236
+ run : |
237
+ set -x
238
+ mkdir -p rapidsnark-linux-x86_64-noasm-${{ github.ref_name }}
239
+ cp -r package_noasm/* rapidsnark-linux-x86_64-noasm-${{ github.ref_name }}/
240
+ zip -r rapidsnark-linux-x86_64-noasm-${{ github.ref_name }}.zip rapidsnark-linux-x86_64-noasm-${{ github.ref_name }}
241
+ gh release upload ${{ github.event.release.tag_name }} rapidsnark-linux-x86_64-noasm-${{ github.ref_name }}.zip
242
+
243
+ - name : Upload Linux ARM64 release artifacts
244
+ if : github.event_name == 'release'
245
+ env :
246
+ GH_TOKEN : ${{ github.token }}
247
+ run : |
248
+ set -x
249
+ mkdir -p rapidsnark-linux-arm64-${{ github.ref_name }}
250
+ cp -r package_arm64/* rapidsnark-linux-arm64-${{ github.ref_name }}/
251
+ zip -r rapidsnark-linux-arm64-${{ github.ref_name }}.zip rapidsnark-linux-arm64-${{ github.ref_name }}
252
+ gh release upload ${{ github.event.release.tag_name }} rapidsnark-linux-arm64-${{ github.ref_name }}.zip
253
+
165
254
build-apple-arm64 :
166
- runs-on : macos-13-xlarge
255
+ runs-on : macos-14
167
256
steps :
168
257
- uses : actions/checkout@v4
169
258
with :
@@ -186,12 +275,14 @@ jobs:
186
275
mkdir -p build_prover_ios && cd build_prover_ios
187
276
cmake .. -GXcode -DTARGET_PLATFORM=IOS -DCMAKE_INSTALL_PREFIX=../package_ios -DBUILD_TESTS=OFF
188
277
xcodebuild -destination 'generic/platform=iOS' -scheme rapidsnarkStatic -project rapidsnark.xcodeproj -configuration Release
278
+ xcodebuild -destination 'generic/platform=iOS' -scheme rapidsnark -project rapidsnark.xcodeproj -configuration Release CODE_SIGNING_ALLOWED=NO
189
279
cp ../depends/gmp/package_ios_arm64/lib/libgmp.a src/Release-iphoneos
190
280
cd ../
191
281
192
282
mkdir -p build_prover_ios_simulator && cd build_prover_ios_simulator
193
- cmake .. -GXcode -DTARGET_PLATFORM=IOS -DCMAKE_INSTALL_PREFIX=../package_ios_simulator -DUSE_ASM=NO -DBUILD_TESTS=OFF
283
+ cmake .. -GXcode -DTARGET_PLATFORM=IOS_SIMULATOR -DCMAKE_INSTALL_PREFIX=../package_ios_simulator -DUSE_ASM=NO -DBUILD_TESTS=OFF
194
284
xcodebuild -destination 'generic/platform=iOS Simulator' -scheme rapidsnarkStatic -project rapidsnark.xcodeproj
285
+ xcodebuild -destination 'generic/platform=iOS Simulator' -scheme rapidsnark -project rapidsnark.xcodeproj CODE_SIGNING_ALLOWED=NO ARCHS=arm64
195
286
cp ../depends/gmp/package_iphone_simulator/lib/libgmp.a src/Debug-iphonesimulator
196
287
cd ../
197
288
0 commit comments