Skip to content

Commit

Permalink
Add support for Node.js v18
Browse files Browse the repository at this point in the history
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
  • Loading branch information
m4heshd committed May 1, 2022
1 parent 7b97d88 commit a24c5c2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prebuild-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/prebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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)
Expand All @@ -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:
Expand All @@ -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 }}"
17 changes: 10 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ on:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
- macos-latest
- windows-2019
node:
- 10
- 12
- 14
- 16
- 18
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -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
Expand All @@ -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 && \
Expand All @@ -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 && \
Expand Down

0 comments on commit a24c5c2

Please sign in to comment.