From c4c42a574036de42324353b0853f14562c29f3d3 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Mon, 3 Nov 2025 20:45:37 +0000 Subject: [PATCH 1/3] fix: build with 16KB page size support --- .github/workflows/prebuilds.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/prebuilds.yml b/.github/workflows/prebuilds.yml index 77439da..0771ae2 100644 --- a/.github/workflows/prebuilds.yml +++ b/.github/workflows/prebuilds.yml @@ -68,8 +68,7 @@ jobs: - name: Install patched cmake-napi working-directory: ./package - run: - npm install -D --ignore-scripts + run: npm install -D --ignore-scripts cmake-napi@github:digidem/cmake-napi-nodejs-mobile - name: Copy CMakeLists.txt @@ -77,9 +76,11 @@ jobs: - name: Generate working-directory: ./package - run: - bare-make generate --platform ${{ matrix.platform }} --arch - ${{matrix.arch }} + run: | + bare-make generate \ + --platform ${{ matrix.platform }} \ + --arch ${{matrix.arch }} \ + -D CMAKE_SHARED_LINKER_FLAGS="-Wl,-z,max-page-size=16384" - name: Build working-directory: ./package @@ -92,12 +93,10 @@ jobs: - name: Upload original prebuild artifacts # mostly for debugging purposes uses: actions/upload-artifact@v4 with: - name: - ${{ env.MODULE_NAME }}-${{ + name: ${{ env.MODULE_NAME }}-${{ steps.parse-module-version.outputs.version }}-node-${{ env.NODE_ABI }}-${{ matrix.platform}}-${{ matrix.arch }} - path: - ./package/prebuilds/${{ matrix.platform }}-${{ matrix.arch }}/*.node + path: ./package/prebuilds/${{ matrix.platform }}-${{ matrix.arch }}/*.node release: if: ${{ inputs.publish_release }} From de759080444c841d1bd8c40325e57e81e1555871 Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Mon, 3 Nov 2025 20:56:46 +0000 Subject: [PATCH 2/3] fix: ensure we don't overwrite working release We haven't actually tested the bare-make build of this in the app yet. --- .github/workflows/prebuilds.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/prebuilds.yml b/.github/workflows/prebuilds.yml index 0771ae2..8afe829 100644 --- a/.github/workflows/prebuilds.yml +++ b/.github/workflows/prebuilds.yml @@ -21,9 +21,10 @@ on: required: false default: true type: boolean - release_tag: - description: "Release tag" + release_tag_suffix: + description: "Release tag suffix" required: false + default: "-bare-make" type: string jobs: @@ -123,4 +124,4 @@ jobs: artifactErrorsFailBuild: true allowUpdates: true replacesArtifacts: true - tag: ${{ inputs.release_tag || needs.build.outputs.module_version }} + tag: ${{ needs.build.outputs.module_version }}${{ inputs.release_tag_suffix }} From 348b4aedaf8eba71caa47e498472b01f61ee422e Mon Sep 17 00:00:00 2001 From: Gregor MacLennan Date: Mon, 3 Nov 2025 21:21:59 +0000 Subject: [PATCH 3/3] fix .node file naming --- .github/workflows/prebuilds.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/prebuilds.yml b/.github/workflows/prebuilds.yml index 8afe829..2546887 100644 --- a/.github/workflows/prebuilds.yml +++ b/.github/workflows/prebuilds.yml @@ -91,6 +91,13 @@ jobs: working-directory: ./package run: bare-make install + - name: Rename + working-directory: ./package + # bare-make uses kebab-case for filenames, but better-sqlite3 expects snake_case for the .node file + run: | + mv ./prebuilds/${{ matrix.platform }}-${{ matrix.arch }}/better-sqlite3.node \ + ./prebuilds/${{ matrix.platform }}-${{ matrix.arch }}/better_sqlite3.node + - name: Upload original prebuild artifacts # mostly for debugging purposes uses: actions/upload-artifact@v4 with: