Skip to content

Commit d8dfbb9

Browse files
authored
Merge pull request #64 from duckdb/jray/workflows-and-gyp-arch
add arch to GitHub workflows and gyp bindings
2 parents 0325c80 + ccda7ea commit d8dfbb9

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

.github/workflows/DuckDBNodeBindingsAndAPI.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
type: boolean
99
required: true
1010
default: true
11-
linux:
12-
description: 'Run on Linux'
11+
linux_x64:
12+
description: 'Run on Linux x64'
1313
type: boolean
1414
required: true
1515
default: false
@@ -19,27 +19,27 @@ on:
1919
required: true
2020
default: false
2121
publish_bindings:
22-
description: 'Publish Bindings (from Linux)'
22+
description: 'Publish Bindings (from Linux x64)'
2323
type: boolean
2424
required: true
2525
default: false
2626
publish_api:
27-
description: 'Publish API (from Linux)'
27+
description: 'Publish API (from Linux x64)'
2828
type: boolean
2929
required: true
3030
default: false
31-
macos:
32-
description: 'Run on Mac OS'
31+
macos_arm64:
32+
description: 'Run on Mac OS X arm64'
3333
type: boolean
3434
required: true
3535
default: false
3636
publish_darwin_arm64:
37-
description: 'Publish Bindings for Darwin ARM64'
37+
description: 'Publish Bindings for Darwin arm64'
3838
type: boolean
3939
required: true
4040
default: false
41-
windows:
42-
description: 'Run on Windows'
41+
windows_x64:
42+
description: 'Run on Windows x64'
4343
type: boolean
4444
required: true
4545
default: false
@@ -56,10 +56,10 @@ concurrency:
5656

5757
jobs:
5858

59-
linux:
60-
name: Linux
59+
linux_x64:
60+
name: Linux x64
6161
runs-on: ubuntu-latest
62-
if: ${{ github.event_name != 'workflow_dispatch' || inputs.linux }}
62+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.linux_x64 }}
6363
steps:
6464
- uses: actions/checkout@v4
6565

@@ -111,10 +111,10 @@ jobs:
111111
env:
112112
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
113113

114-
macos:
115-
name: Mac OS X
114+
macos_arm64:
115+
name: Mac OS X arm64
116116
runs-on: macos-latest
117-
if: ${{ github.event_name != 'workflow_dispatch' || inputs.macos }}
117+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.macos_arm64 }}
118118
steps:
119119
- uses: actions/checkout@v4
120120

@@ -145,17 +145,17 @@ jobs:
145145
if: ${{ inputs.publish_darwin_arm64 }}
146146
run: git status
147147

148-
- name: Publish - Bindings - Darwin ARM64
148+
- name: Publish - Bindings - Darwin arm64
149149
if: ${{ inputs.publish_darwin_arm64 }}
150150
working-directory: bindings/pkgs/@duckdb/node-bindings-darwin-arm64
151151
run: pnpm publish ${{ inputs.publish_dry_run && '--dry-run' || '' }} --publish-branch ${{ github.ref_name }} --access public
152152
env:
153153
NPM_AUTH_TOKEN: ${{ secrets.DUCKDB_NPM_TOKEN }}
154154

155-
windows:
156-
name: Windows
155+
windows_x64:
156+
name: Windows x64
157157
runs-on: windows-latest
158-
if: ${{ github.event_name != 'workflow_dispatch' || inputs.windows }}
158+
if: ${{ github.event_name != 'workflow_dispatch' || inputs.windows_x64 }}
159159
steps:
160160
- uses: actions/checkout@v4
161161

bindings/binding.gyp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
'target_name': 'fetch_libduckdb',
55
'type': 'none',
66
'conditions': [
7-
['OS=="linux"', {
7+
['OS=="linux" and target_arch=="x64"', {
88
'variables': {
99
'script_path': '<(module_root_dir)/scripts/fetch_libduckdb_linux_amd64.py',
1010
},
@@ -14,7 +14,7 @@
1414
'script_path': '<(module_root_dir)/scripts/fetch_libduckdb_osx_universal.py',
1515
},
1616
}],
17-
['OS=="win"', {
17+
['OS=="win" and target_arch=="x64"', {
1818
'variables': {
1919
'script_path': '<(module_root_dir)/scripts/fetch_libduckdb_windows_amd64.py',
2020
},
@@ -39,7 +39,7 @@
3939
'sources': ['src/duckdb_node_bindings.cpp'],
4040
'include_dirs': ['<(module_root_dir)/libduckdb'],
4141
'conditions': [
42-
['OS=="linux"', {
42+
['OS=="linux" and target_arch=="x64"', {
4343
'link_settings': {
4444
'libraries': [
4545
'-lduckdb',
@@ -73,7 +73,7 @@
7373
},
7474
],
7575
}],
76-
['OS=="win"', {
76+
['OS=="win" and target_arch=="x64"', {
7777
'link_settings': {
7878
'libraries': [
7979
'<(module_root_dir)/libduckdb/duckdb.lib',
@@ -93,7 +93,7 @@
9393
'type': 'none',
9494
'dependencies': ['duckdb'],
9595
'conditions': [
96-
['OS=="linux"', {
96+
['OS=="linux" and target_arch=="x64"', {
9797
'copies': [
9898
{
9999
'files': ['<(module_root_dir)/build/Release/duckdb.node'],
@@ -109,7 +109,7 @@
109109
},
110110
],
111111
}],
112-
['OS=="win"', {
112+
['OS=="win" and target_arch=="x64"', {
113113
'copies': [
114114
{
115115
'files': ['<(module_root_dir)/build/Release/duckdb.node'],

0 commit comments

Comments
 (0)