73
73
with :
74
74
name : sqlite-http-macos-wheels
75
75
path : dist/wheels/*.whl
76
-
76
+ build-macos-arm-extension :
77
+ runs-on : macos-latest
78
+ steps :
79
+ - uses : actions/checkout@v2
80
+ # using actions/setup-go@v1 is the only way to get macos build to work.
81
+ # otherwise, with v2, would get this cgo error: 'cgo-generated-wrappers:13:13: error: redefinition of 'free' as different kind of symbol'
82
+ - name : Set up Go 1.20
83
+ uses : actions/setup-go@v1
84
+ with :
85
+ go-version : 1.20
86
+ - run : GOOS=darwin GOARCH=arm64 CC="gcc -target arm64-apple-macos11" make loadable
87
+ - uses : actions/upload-artifact@v3
88
+ with :
89
+ name : sqlite-http-macos-arm
90
+ path : dist/http0.dylib
91
+ build-macos-arm-python :
92
+ runs-on : macos-latest
93
+ needs : [build-macos-arm-extension]
94
+ steps :
95
+ - uses : actions/checkout@v3
96
+ - name : Download workflow artifacts
97
+ uses : actions/download-artifact@v3
98
+ with :
99
+ name : sqlite-http-macos-arm
100
+ path : dist/
101
+ - uses : actions/setup-python@v3
102
+ - run : pip install wheel
103
+ - run : make python IS_MACOS_ARM=1
104
+ - uses : actions/upload-artifact@v3
105
+ with :
106
+ name : sqlite-http-macos-arm-wheels
107
+ path : dist/wheels/*.whl
77
108
build-windows-extension :
78
109
name : Building windows extension
79
110
runs-on : windows-latest
@@ -113,6 +144,7 @@ jobs:
113
144
needs :
114
145
[
115
146
build-macos-extension,
147
+ build-macos-arm-extension,
116
148
build-linux_x86-extension,
117
149
build-windows-extension,
118
150
]
@@ -130,12 +162,14 @@ jobs:
130
162
platforms : |
131
163
linux-x86_64: sqlite-http-linux_x86/*
132
164
macos-x86_64: sqlite-http-macos/*
165
+ macos-aarch64: sqlite-http-macos-arm/*
133
166
windows-x86_64: sqlite-http-windows/*
134
167
upload-deno :
135
168
name : Upload Deno release assets
136
169
needs :
137
170
[
138
171
build-macos-extension,
172
+ build-macos-arm-extension,
139
173
build-linux_x86-extension,
140
174
build-windows-extension,
141
175
]
@@ -156,6 +190,7 @@ jobs:
156
190
needs :
157
191
[
158
192
build-macos-extension,
193
+ build-macos-arm-extension,
159
194
build-linux_x86-extension,
160
195
build-windows-extension,
161
196
]
@@ -183,6 +218,11 @@ jobs:
183
218
run : npm publish --access public
184
219
env :
185
220
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
221
+ - name : Publish NPM sqlite-http-darwin-arm64
222
+ working-directory : npm/sqlite-http-darwin-arm64
223
+ run : npm publish --access public
224
+ env :
225
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
186
226
- name : Publish NPM sqlite-http-windows-x64
187
227
working-directory : npm/sqlite-http-windows-x64
188
228
run : npm publish --access public
@@ -194,7 +234,13 @@ jobs:
194
234
env :
195
235
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
196
236
upload_pypi :
197
- needs : [build-linux_x86-python, build-macos-python, build-windows-python]
237
+ needs :
238
+ [
239
+ build-linux_x86-python,
240
+ build-macos-python,
241
+ build-macos-arm-python,
242
+ build-windows-python,
243
+ ]
198
244
runs-on : ubuntu-latest
199
245
steps :
200
246
- uses : actions/download-artifact@v3
@@ -209,6 +255,10 @@ jobs:
209
255
with :
210
256
name : sqlite-http-macos-wheels
211
257
path : dist
258
+ - uses : actions/download-artifact@v3
259
+ with :
260
+ name : sqlite-http-macos-arm-wheels
261
+ path : dist
212
262
- uses : pypa/gh-action-pypi-publish@release/v1
213
263
with :
214
264
password : ${{ secrets.PYPI_API_TOKEN }}
@@ -217,6 +267,7 @@ jobs:
217
267
needs :
218
268
[
219
269
build-macos-extension,
270
+ build-macos-arm-extension,
220
271
build-linux_x86-extension,
221
272
build-windows-extension,
222
273
]
@@ -241,6 +292,12 @@ jobs:
241
292
gem -C bindings/ruby build -o ${{ env.PLATFORM }}.gem sqlite_http.gemspec
242
293
env:
243
294
PLATFORM: x86_64-darwin
295
+ - run : |
296
+ rm bindings/ruby/lib/*.{dylib,so,dll} || true
297
+ cp sqlite-http-macos-arm/*.dylib bindings/ruby/lib
298
+ gem -C bindings/ruby build -o ${{ env.PLATFORM }}.gem sqlite_http.gemspec
299
+ env:
300
+ PLATFORM: arm64-darwin
244
301
- run : |
245
302
rm bindings/ruby/lib/*.{dylib,so,dll} || true
246
303
cp sqlite-http-windows/*.dll bindings/ruby/lib
@@ -250,6 +307,7 @@ jobs:
250
307
- run : |
251
308
gem push bindings/ruby/x86_64-linux.gem
252
309
gem push bindings/ruby/x86_64-darwin.gem
310
+ gem push bindings/ruby/arm64-darwin.gem
253
311
gem push bindings/ruby/x64-mingw32.gem
254
312
env:
255
313
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
0 commit comments