From 6db6d5724d0c633809f21f37b9ca9b603d911b7c Mon Sep 17 00:00:00 2001 From: Jeff Raymakers Date: Sun, 30 Jun 2024 12:53:51 -0700 Subject: [PATCH] also build on windows --- .github/workflows/NodeJS.yml | 25 ++++++++++++++++++++----- alt/bindings/binding.gyp | 15 ++++++++++++++- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/.github/workflows/NodeJS.yml b/.github/workflows/NodeJS.yml index 8d43bcf5..5f316eaf 100644 --- a/.github/workflows/NodeJS.yml +++ b/.github/workflows/NodeJS.yml @@ -198,9 +198,9 @@ jobs: # shell: bash # run: ./scripts/node_build.sh ${{ matrix.node }} - # win-nodejs: - # name: node.js Windows - # runs-on: windows-latest + win-nodejs: + name: node.js Windows + runs-on: windows-latest # needs: linux-nodejs # continue-on-error: ${{ matrix.node != '18' && matrix.node != '20' && matrix.node != '21' }} # env: @@ -227,12 +227,27 @@ jobs: # - isRelease: false # node: 20 - # steps: + steps: # - uses: actions/setup-python@v4 # with: # python-version: '3.8' - # - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + sparse-checkout: alt + + - name: Bindings (Install, Configure, and Build) + working-directory: alt/bindings + run: npm i + + - name: Test (Install) + working-directory: alt/test + run: npm i + + - name: Test (Run) + working-directory: alt/test + run: npm run test + # with: # fetch-depth: 0 diff --git a/alt/bindings/binding.gyp b/alt/bindings/binding.gyp index 597e175e..04bc6bf5 100644 --- a/alt/bindings/binding.gyp +++ b/alt/bindings/binding.gyp @@ -55,7 +55,20 @@ 'destination': 'package/lib', }, ], - }] + }], + ['OS=="win"', { + 'link_settings': { + 'libraries': [ + '<(module_root_dir)/libduckdb/libduckdb.lib', + ], + }, + 'copies': [ + { + 'files': ['<(module_root_dir)/libduckdb/libduckdb.dll'], + 'destination': 'package/lib', + }, + ], + }], ] }, {