-
Notifications
You must be signed in to change notification settings - Fork 38
442 lines (363 loc) · 13 KB
/
DuckDBNodeBindingsAndAPI.yml
File metadata and controls
442 lines (363 loc) · 13 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
name: DuckDB Node Bindings & API
on:
pull_request:
workflow_dispatch:
inputs:
publish:
description: 'Publish'
type: boolean
required: true
default: false
publish_dry_run:
description: 'Publish Dry Run'
type: boolean
required: true
default: true
linux_x64:
description: 'Run on Linux x64'
type: boolean
required: true
default: false
# publish_linux_x64:
# description: 'Publish Bindings for Linux x64'
# type: boolean
# required: true
# default: false
# publish_bindings:
# description: 'Publish Bindings (from Linux x64)'
# type: boolean
# required: true
# default: false
# publish_api:
# description: 'Publish API (from Linux x64)'
# type: boolean
# required: true
# default: false
linux_arm64:
description: 'Run on Linux arm64'
type: boolean
required: true
default: false
# publish_linux_arm64:
# description: 'Publish Bindings for Linux arm64'
# type: boolean
# required: true
# default: false
macos_arm64:
description: 'Run on Mac OS X arm64'
type: boolean
required: true
default: false
# publish_darwin_arm64:
# description: 'Publish Bindings for Darwin arm64'
# type: boolean
# required: true
# default: false
macos_x64:
description: 'Run on Mac OS X x64'
type: boolean
required: true
default: false
windows_arm64:
description: 'Run on Windows arm64'
type: boolean
required: true
default: false
# publish_win32_arm64:
# description: 'Publish Bindings for Win32 arm64'
# type: boolean
# required: true
# default: false
windows_x64:
description: 'Run on Windows x64'
type: boolean
required: true
default: false
# publish_win32_x64:
# description: 'Publish Bindings for Win32 x64'
# type: boolean
# required: true
# default: false
repository_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: false
jobs:
linux_x64:
name: Linux x64
runs-on: ubuntu-24.04
container:
image: quay.io/pypa/manylinux_2_28_x86_64
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.linux_x64 }}
steps:
# - name: find stdc++ lib location
# run: /sbin/ldconfig -p | grep stdc++
# - name: check LIBCXX strings in libstdc++
# run: strings /lib64/libstdc++.so.6 | grep LIBCXX
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
run: echo "NODE_DIR=$(dirname $(dirname $(which node)))" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
- name: API - Test
working-directory: api
run: pnpm test
# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status
- name: Publish - Bindings - Linux x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-linux-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
- name: Publish - Bindings
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
- name: Publish - API
if: ${{ inputs.publish }}
working-directory: api/pkgs/@duckdb/node-api
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
linux_arm64:
name: Linux arm64
runs-on: ubuntu-24.04-arm
container:
image: quay.io/pypa/manylinux_2_28_aarch64
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.linux_arm64 }}
steps:
# - name: find stdc++ lib location
# run: /sbin/ldconfig -p | grep stdc++
# - name: check LIBCXX strings in libstdc++
# run: strings /lib64/libstdc++.so.6 | grep LIBCXX
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
run: echo "NODE_DIR=$(dirname $(dirname $(which node)))" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
# - name: Git Status
# if: ${{ inputs.publish }}
# run: git status
- name: Publish - Bindings - Linux arm64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-linux-arm64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
macos_arm64:
name: Mac OS X arm64
runs-on: macos-15
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.macos_arm64 }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
run: echo "NODE_DIR=$(dirname $(dirname $(which node)))" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
- name: API - Test
working-directory: api
run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Darwin arm64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-darwin-arm64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
macos_x64:
name: Mac OS X x64
runs-on: macos-15-intel
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.macos_x64 }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
run: echo "NODE_DIR=$(dirname $(dirname $(which node)))" >> "$GITHUB_ENV"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
- name: API - Test
working-directory: api
run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Darwin x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-darwin-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
windows_x64:
name: Windows x64
runs-on: windows-2025
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.windows_x64 }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
shell: bash
run: echo "NODE_DIR=D:\\a\\node-v24.10.0" >> "$GITHUB_ENV"
- name: Cache Node directory
id: cache-node-dir
uses: actions/cache@v4
with:
path: D:\\a\\node-v24.10.0
key: node-dir-v24.10.0-win-x64
- name: Download Node headers
if: steps.cache-node-dir.outputs.cache-hit != 'true'
shell: bash
run: curl -sSL "https://nodejs.org/download/release/v24.10.0/node-v24.10.0-headers.tar.gz" -o "D:/a/node-v24.10.0-headers.tar.gz"
- name: Extract Node headers
if: steps.cache-node-dir.outputs.cache-hit != 'true'
run: tar -xzf D:\a\node-v24.10.0-headers.tar.gz -C D:\a
- name: Download Node lib
if: steps.cache-node-dir.outputs.cache-hit != 'true'
shell: bash
run: curl -sSL "https://nodejs.org/download/release/v24.10.0/win-x64/node.lib" --create-dirs -o "$NODE_DIR/Release/node.lib"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
- name: API - Test
working-directory: api
run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Win32 x64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-win32-x64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest
windows_arm64:
name: Windows arm64
runs-on: windows-11-arm
permissions:
contents: read
id-token: write # for OIDC, for trusted publishing
if: ${{ github.event_name != 'workflow_dispatch' || inputs.windows_arm64 }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v6
with:
node-version: 24
- name: Record Node directory
shell: bash
run: echo "NODE_DIR=C:\\a\\node-v24.10.0" >> "$GITHUB_ENV"
- name: Cache Node directory
id: cache-node-dir
uses: actions/cache@v4
with:
path: C:\\a\\node-v24.10.0
key: node-dir-v24.10.0-win-arm64
- name: Download Node headers
if: steps.cache-node-dir.outputs.cache-hit != 'true'
shell: bash
run: curl -sSL "https://nodejs.org/download/release/v24.10.0/node-v24.10.0-headers.tar.gz" -o "C:/a/node-v24.10.0-headers.tar.gz"
- name: Extract Node headers
if: steps.cache-node-dir.outputs.cache-hit != 'true'
run: tar -xzf C:\a\node-v24.10.0-headers.tar.gz -C C:\a
- name: Download Node lib
if: steps.cache-node-dir.outputs.cache-hit != 'true'
shell: bash
run: curl -sSL "https://nodejs.org/download/release/v24.10.0/win-arm64/node.lib" --create-dirs -o "$NODE_DIR/Release/node.lib"
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Workspace - Install
run: pnpm install --ignore-scripts
- name: Bindings - Build
working-directory: bindings
run: pnpm run build
- name: Bindings - Test
working-directory: bindings
run: pnpm test
- name: API - Build
working-directory: api
run: pnpm run build
- name: API - Test
working-directory: api
run: pnpm test
- name: Git Status
if: ${{ inputs.publish }}
run: git status
- name: Publish - Bindings - Win32 arm64
if: ${{ inputs.publish }}
working-directory: bindings/pkgs/@duckdb/node-bindings-win32-arm64
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public --tag latest