From ca08519da129212d8c4101a08222f9ab7caff9c0 Mon Sep 17 00:00:00 2001 From: Matthew McEachen Date: Mon, 29 Apr 2024 15:29:42 -0700 Subject: [PATCH 1/3] Drop unsupported versions of node and electron --- .github/workflows/build.yml | 19 ++++++++++++------- .github/workflows/bump-version.yml | 2 +- .github/workflows/update-sqlite.yml | 2 +- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6f27085..334fcd0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,8 +13,12 @@ on: workflow_dispatch: {} env: - NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 --include-regex 'better_sqlite3.node$' - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' + # See https://nodejs.org/en/about/previous-releases + # Node.js 16 EOL = 11 Sep 2023 + NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' + # See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy + # The v25 EOL = 2023-dec-5. v26 EOL = 2024-feb-20. v27 EOL = 2024-apr-16. v28 EOL = 2024-jun-11. v29 EOL = 2024-aug-20. + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' jobs: test: @@ -29,6 +33,7 @@ jobs: - 18 - 20 - 21 + - 22 name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -61,7 +66,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 registry-url: https://registry.npmjs.org - run: npm publish env: @@ -82,7 +87,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - if: ${{ startsWith(matrix.os, 'windows') }} run: pip.exe install setuptools - if: ${{ ! startsWith(matrix.os, 'windows') && matrix.os != 'macos-14' }} @@ -102,7 +107,7 @@ jobs: prebuild-alpine: name: Prebuild on alpine runs-on: ubuntu-latest - container: node:16-alpine + container: node:18-alpine needs: publish steps: - uses: actions/checkout@v4 @@ -123,7 +128,7 @@ jobs: - uses: actions/checkout@v4 - uses: docker/setup-qemu-action@v3 - run: | - docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16-alpine -c "\ + docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\ apk add build-base git python3 py3-setuptools --update-cache && \ cd /tmp/project && \ npm install --ignore-scripts && \ @@ -142,7 +147,7 @@ jobs: - uses: actions/checkout@v4 - uses: docker/setup-qemu-action@v3 - run: | - docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16 -c "\ + docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18 -c "\ cd /tmp/project && \ npm install --ignore-scripts && \ ${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 6c014fad..dcb18e0a 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -23,7 +23,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Configure user run: | git config --local user.name "${{ github.actor }}" diff --git a/.github/workflows/update-sqlite.yml b/.github/workflows/update-sqlite.yml index 341d8d68..d0fc1c60 100644 --- a/.github/workflows/update-sqlite.yml +++ b/.github/workflows/update-sqlite.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 - name: Create new update branch run: git checkout -b sqlite-update-${{ env.ENV_VERSION }} - name: Update download script From d9ffab7a9307fc8d782cd4e73a35624cadfaa400 Mon Sep 17 00:00:00 2001 From: Matthew McEachen Date: Thu, 30 May 2024 11:02:46 -0700 Subject: [PATCH 2/3] Drop Node.js v21 prebuilds --- .github/workflows/build.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 828fd9d0..746cb8b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,11 +13,13 @@ on: workflow_dispatch: {} env: - # See https://nodejs.org/en/about/previous-releases - # Node.js 16 EOL = 11 Sep 2023 - NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' + # See https://github.com/nodejs/release#release-schedule + # Node.js v16 EOL = 2023-09-11. v21 EOL = 2024-06-01. + NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' + # Merge with NODE_BUILD_CMD when Node.js v18 is EOL + NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' # See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy - # The v25 EOL = 2023-dec-5. v26 EOL = 2024-feb-20. v27 EOL = 2024-apr-16. v28 EOL = 2024-jun-11. v29 EOL = 2024-aug-20. + # Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20. ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' jobs: @@ -32,7 +34,6 @@ jobs: node: - 18 - 20 - - 21 - 22 name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -74,6 +75,7 @@ jobs: prebuild: strategy: + fail-fast: false matrix: os: - ubuntu-20.04 @@ -100,11 +102,13 @@ jobs: - if: matrix.os == 'windows-2019' run: | ${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }} - npx --no-install prebuild -r node -t 20.0.0 -t 21.0.0 --include-regex 'better_sqlite3.node$' --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} + ${{ env.NO_V18_NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} ${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }} ${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }} prebuild-alpine: + strategy: + fail-fast: false name: Prebuild on alpine runs-on: ubuntu-latest container: node:18-alpine @@ -117,6 +121,7 @@ jobs: prebuild-alpine-arm: strategy: + fail-fast: false matrix: arch: - arm/v7 @@ -136,6 +141,7 @@ jobs: prebuild-linux-arm: strategy: + fail-fast: false matrix: arch: - arm/v7 From 32134f296cb3060adb37b8e3e05aeeb52954a44d Mon Sep 17 00:00:00 2001 From: Matthew McEachen Date: Thu, 30 May 2024 11:19:29 -0700 Subject: [PATCH 3/3] Also drop electron v25 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 746cb8b1..7b17b89a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ env: NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 --include-regex 'better_sqlite3.node$' # See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy # Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20. - ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 25.0.0 -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' + ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 --include-regex 'better_sqlite3.node$' jobs: test: