From a24c5c20489f4bd660f011628384281edb637fd6 Mon Sep 17 00:00:00 2001 From: Mahesh Bandara Wijerathna Date: Sun, 1 May 2022 22:52:00 +0530 Subject: [PATCH] Add support for Node.js `v18` Other changes: - Ubuntu image for tests has been changed to ubuntu-20.04 since Node v18 requires GLIBC 2.28 - Disabled `fail-fast` for test matrices --- .github/workflows/prebuild-test.yml | 2 +- .github/workflows/prebuild.yml | 8 ++++---- .github/workflows/test.yml | 17 ++++++++++------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/prebuild-test.yml b/.github/workflows/prebuild-test.yml index 2dea27aa..f6de2333 100644 --- a/.github/workflows/prebuild-test.yml +++ b/.github/workflows/prebuild-test.yml @@ -10,7 +10,7 @@ on: targets: description: 'Runtime versions' required: true - default: -t 16.0.0 + default: -t 18.0.0 platform: description: 'Platform' required: true diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml index 2af2812d..418a6468 100644 --- a/.github/workflows/prebuild.yml +++ b/.github/workflows/prebuild.yml @@ -21,7 +21,7 @@ jobs: with: node-version: 16 - run: npm install --ignore-scripts - - run: npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} + - run: npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} - run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} - if: matrix.os == 'windows-2019' run: npx --no-install prebuild -r electron -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' --arch ia32 -u ${{ secrets.GITHUB_TOKEN }} @@ -34,7 +34,7 @@ jobs: - uses: actions/checkout@v2 - run: apk add build-base git python3 --update-cache - run: npm install --ignore-scripts - - run: npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} + - run: npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }} prebuild-alpine-linux-arm64: name: Prebuild on Alpine-Linux (arm64) @@ -47,7 +47,7 @@ jobs: apk add build-base git python3 --update-cache && \ cd /tmp/project && \ npm install --ignore-scripts && \ - npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}" + npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}" prebuild-linux-arm: strategy: @@ -64,4 +64,4 @@ jobs: docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:16 -c "\ cd /tmp/project && \ npm install --ignore-scripts && \ - npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}" + npx --no-install prebuild -r node -t 10.20.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 --include-regex 'better_sqlite3.node$' -u ${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 49d37c1b..6fb56146 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,10 @@ on: jobs: test: strategy: + fail-fast: false matrix: os: - - ubuntu-18.04 + - ubuntu-20.04 - macos-latest - windows-2019 node: @@ -23,6 +24,7 @@ jobs: - 12 - 14 - 16 + - 18 name: Testing Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} steps: @@ -35,9 +37,9 @@ jobs: - run: npm test test-alpine-linux: - name: Testing Node 16 on Alpine-Linux + name: Testing Node 18 on Alpine-Linux runs-on: ubuntu-latest - container: node:16-alpine + container: node:18-alpine steps: - uses: actions/checkout@v2 - run: apk add build-base git python3 --update-cache @@ -46,13 +48,13 @@ jobs: - run: npm test test-alpine-linux-arm64: - name: Testing Node 16 on Alpine-Linux (arm64) + name: Testing Node 18 on Alpine-Linux (arm64) runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: docker/setup-qemu-action@v1 - run: | - docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/arm64 node:16-alpine -c "\ + docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/arm64 node:18-alpine -c "\ apk add build-base git python3 --update-cache && \ cd /tmp/project && \ npm install --ignore-scripts && \ @@ -61,17 +63,18 @@ jobs: test-linux-arm: strategy: + fail-fast: false matrix: arch: - arm/v7 - arm64 - name: Testing Node 16 on Linux (${{ matrix.arch }}) + name: Testing Node 18 on Linux (${{ matrix.arch }}) runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: docker/setup-qemu-action@v1 - 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 && \ npm run build-debug && \