zeroshade commented on code in PR #4046:
URL: https://github.com/apache/arrow-adbc/pull/4046#discussion_r2884928714
##########
.github/workflows/packaging.yml:
##########
@@ -1096,6 +1096,151 @@ jobs:
docker compose run python-sdist-test
popd
+ node-binaries:
+ name: "Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}"
+ runs-on: ${{ matrix.settings.host }}
+ needs:
+ - source
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npx napi build --platform --release --target
x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npx napi build --platform --release --target
aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npx napi build --platform --release --target
x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npx napi build --platform --release --target
x86_64-unknown-linux-gnu --use-napi-cross
+ - host: ubuntu-latest
Review Comment:
same as above, should use the arm image
##########
.github/workflows/packaging.yml:
##########
@@ -1096,6 +1096,151 @@ jobs:
docker compose run python-sdist-test
popd
+ node-binaries:
+ name: "Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}"
+ runs-on: ${{ matrix.settings.host }}
+ needs:
+ - source
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npx napi build --platform --release --target
x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npx napi build --platform --release --target
aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npx napi build --platform --release --target
x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npx napi build --platform --release --target
x86_64-unknown-linux-gnu --use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npx napi build --platform --release --target
aarch64-unknown-linux-gnu --use-napi-cross
+ steps:
+ - uses: actions/download-artifact@v6
+ with:
+ name: source
+
+ - name: Extract source archive
+ run: |
+ source_archive=$(echo apache-arrow-adbc-*.tar.gz)
+ VERSION=${source_archive#apache-arrow-adbc-}
+ VERSION=${VERSION%.tar.gz}
+
+ tar xf apache-arrow-adbc-${VERSION}.tar.gz
+ mv apache-arrow-adbc-${VERSION} adbc
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: adbc/javascript/package-lock.json
+
+ - name: Setup Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
+
+ - name: Install Node dependencies
+ working-directory: adbc/javascript
+ run: npm install
Review Comment:
`npm ci`
##########
.github/workflows/packaging.yml:
##########
@@ -1096,6 +1096,151 @@ jobs:
docker compose run python-sdist-test
popd
+ node-binaries:
+ name: "Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}"
+ runs-on: ${{ matrix.settings.host }}
+ needs:
+ - source
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npx napi build --platform --release --target
x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npx napi build --platform --release --target
aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npx napi build --platform --release --target
x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npx napi build --platform --release --target
x86_64-unknown-linux-gnu --use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npx napi build --platform --release --target
aarch64-unknown-linux-gnu --use-napi-cross
+ steps:
+ - uses: actions/download-artifact@v6
+ with:
+ name: source
+
+ - name: Extract source archive
+ run: |
+ source_archive=$(echo apache-arrow-adbc-*.tar.gz)
+ VERSION=${source_archive#apache-arrow-adbc-}
+ VERSION=${VERSION%.tar.gz}
+
+ tar xf apache-arrow-adbc-${VERSION}.tar.gz
+ mv apache-arrow-adbc-${VERSION} adbc
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: adbc/javascript/package-lock.json
+
+ - name: Setup Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
+
+ - name: Install Node dependencies
+ working-directory: adbc/javascript
+ run: npm install
+
+ - name: Build Node.js binaries
+ working-directory: adbc/javascript
+ run: ${{ matrix.settings.build }}
+ shell: bash
+
+ - name: Sign binary (macOS)
+ if: runner.os == 'macOS'
+ working-directory: adbc/javascript
+ run: codesign --sign - *.node
Review Comment:
do we actually have the env set up properly for doing codesigning here?
@lidavidm
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Cargo fmt
+ working-directory: javascript
+ run: cargo fmt -- --check
+ - name: Clippy
+ working-directory: javascript
+ run: cargo clippy -- -D warnings
+
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npm run build -- --target x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npm run build -- --target aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npm run build -- --target x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npm run build -- --target x86_64-unknown-linux-gnu
--use-napi-cross
+ - host: ubuntu-latest
Review Comment:
`ubuntu-24.04-arm`?
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Cargo fmt
+ working-directory: javascript
+ run: cargo fmt -- --check
+ - name: Clippy
+ working-directory: javascript
+ run: cargo clippy -- -D warnings
+
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npm run build -- --target x86_64-apple-darwin
Review Comment:
since these all match the pattern of `npm run build -- --target {{ target
}}` can we extract this from the matrix and just use that pattern below instead?
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Cargo fmt
+ working-directory: javascript
+ run: cargo fmt -- --check
+ - name: Clippy
+ working-directory: javascript
+ run: cargo clippy -- -D warnings
+
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npm run build -- --target x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npm run build -- --target aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npm run build -- --target x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npm run build -- --target x86_64-unknown-linux-gnu
--use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npm run build -- --target aarch64-unknown-linux-gnu
--use-napi-cross
+ name: Build Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}
+ runs-on: ${{ matrix.settings.host }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
Review Comment:
same as above, `npm ci`?
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Cargo fmt
+ working-directory: javascript
+ run: cargo fmt -- --check
+ - name: Clippy
+ working-directory: javascript
+ run: cargo clippy -- -D warnings
+
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npm run build -- --target x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npm run build -- --target aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npm run build -- --target x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npm run build -- --target x86_64-unknown-linux-gnu
--use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npm run build -- --target aarch64-unknown-linux-gnu
--use-napi-cross
+ name: Build Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}
+ runs-on: ${{ matrix.settings.host }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Build
+ working-directory: javascript
+ run: ${{ matrix.settings.build }}
+ shell: bash
+ - name: Ad-hoc sign binary (macOS)
+ if: runner.os == 'macOS'
+ working-directory: javascript
+ run: codesign --sign - *.node
+ - name: Upload artifact
+ uses: actions/upload-artifact@v4
+ with:
+ name: bindings-${{ matrix.settings.target }}
+ path: javascript/*.node
+ if-no-files-found: error
+
+ test:
+ name: Test ${{ matrix.settings.target }}
+ needs: build
+ runs-on: ${{ matrix.settings.host }}
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ - host: macos-latest
+ target: x86_64-apple-darwin
Review Comment:
what about `macos-15-intel` and `ubuntu-24.04-arm`?
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
Review Comment:
`npm ci`?
##########
.github/workflows/packaging.yml:
##########
@@ -1096,6 +1096,151 @@ jobs:
docker compose run python-sdist-test
popd
+ node-binaries:
+ name: "Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}"
+ runs-on: ${{ matrix.settings.host }}
+ needs:
+ - source
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npx napi build --platform --release --target
x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npx napi build --platform --release --target
aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npx napi build --platform --release --target
x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npx napi build --platform --release --target
x86_64-unknown-linux-gnu --use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npx napi build --platform --release --target
aarch64-unknown-linux-gnu --use-napi-cross
+ steps:
+ - uses: actions/download-artifact@v6
+ with:
+ name: source
+
+ - name: Extract source archive
+ run: |
+ source_archive=$(echo apache-arrow-adbc-*.tar.gz)
+ VERSION=${source_archive#apache-arrow-adbc-}
+ VERSION=${VERSION%.tar.gz}
+
+ tar xf apache-arrow-adbc-${VERSION}.tar.gz
+ mv apache-arrow-adbc-${VERSION} adbc
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: adbc/javascript/package-lock.json
+
+ - name: Setup Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
+
+ - name: Install Node dependencies
+ working-directory: adbc/javascript
+ run: npm install
+
+ - name: Build Node.js binaries
+ working-directory: adbc/javascript
+ run: ${{ matrix.settings.build }}
+ shell: bash
+
+ - name: Sign binary (macOS)
+ if: runner.os == 'macOS'
+ working-directory: adbc/javascript
+ run: codesign --sign - *.node
+
+ - name: Upload Node.js binaries
+ uses: actions/upload-artifact@v5
+ with:
+ name: bindings-${{ matrix.settings.target }}
+ path: adbc/javascript/*.node
+ if-no-files-found: error
+
+ node-dist:
+ name: "Node.js Package"
+ runs-on: ubuntu-latest
+ needs:
+ - source
+ - node-binaries
+ steps:
+ - uses: actions/download-artifact@v6
+ with:
+ name: source
+
+ - name: Extract source archive
+ run: |
+ source_archive=$(echo apache-arrow-adbc-*.tar.gz)
+ VERSION=${source_archive#apache-arrow-adbc-}
+ VERSION=${VERSION%.tar.gz}
+
+ tar xf apache-arrow-adbc-${VERSION}.tar.gz
+ mv apache-arrow-adbc-${VERSION} adbc
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: adbc/javascript/package-lock.json
+
+ - name: Install Node dependencies
+ working-directory: adbc/javascript
+ run: npm install
Review Comment:
`npm ci`
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
Review Comment:
should we match the cargo setup in the `rust.yml` workflow?
##########
.github/workflows/node.yml:
##########
@@ -0,0 +1,172 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: Node.js Binding
+
+env:
+ DEBUG: napi:*
+ APP_NAME: adbc-driver-manager
+ MACOSX_DEPLOYMENT_TARGET: '10.13'
+ CARGO_INCREMENTAL: '1'
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+ pull_request:
+ paths:
+ - 'javascript/**'
+ - 'rust/**'
+ - '.github/workflows/node.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ components: clippy, rustfmt
+ - name: Install dependencies
+ working-directory: javascript
+ run: npm install
+ - name: Cargo fmt
+ working-directory: javascript
+ run: cargo fmt -- --check
+ - name: Clippy
+ working-directory: javascript
+ run: cargo clippy -- -D warnings
+
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ settings:
+ - host: macos-15-intel
+ target: x86_64-apple-darwin
+ arch: amd64
+ os: macOS
+ build: npm run build -- --target x86_64-apple-darwin
+ - host: macos-latest
+ target: aarch64-apple-darwin
+ arch: arm64
+ os: macOS
+ build: npm run build -- --target aarch64-apple-darwin
+ - host: windows-latest
+ target: x86_64-pc-windows-msvc
+ arch: amd64
+ os: Windows
+ build: npm run build -- --target x86_64-pc-windows-msvc
+ - host: ubuntu-latest
+ target: x86_64-unknown-linux-gnu
+ arch: amd64
+ os: Linux
+ build: npm run build -- --target x86_64-unknown-linux-gnu
--use-napi-cross
+ - host: ubuntu-latest
+ target: aarch64-unknown-linux-gnu
+ arch: arm64
+ os: Linux
+ build: npm run build -- --target aarch64-unknown-linux-gnu
--use-napi-cross
+ name: Build Node.js ${{ matrix.settings.arch }} ${{ matrix.settings.os }}
+ runs-on: ${{ matrix.settings.host }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Setup node
+ uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: 'npm'
+ cache-dependency-path: javascript/package-lock.json
+ - name: Install Rust
+ uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
# stable
+ with:
+ toolchain: stable
+ targets: ${{ matrix.settings.target }}
Review Comment:
same comment as above regarding matching the same cargo config/setup as the
rust.yml workflows
##########
dev/release/rat_exclude_files.txt:
##########
@@ -43,3 +43,6 @@ r/*/.Rbuildignore
r/*/tests/testthat/_snaps/*
rust/Cargo.lock
testing/*
+javascript/core/Cargo.lock
+javascript/binding.d.ts
+javascript/binding.js
Review Comment:
if these are generated, we should probably add that to `.gitattributes`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]