Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.
Open
43 changes: 31 additions & 12 deletions .github/workflows/configure.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Recommendations:
# * Do not run `npm test`
# * macOS and Ubuntu: Node.js v20.x and Python 3.12
# * Windows: Node.js v16.x and Python 3.11 -- Do not run `node-gyp rebuild`
#
# Lessons learned:
# 1. Node.js >= v21 fails
# 2. Node.js >= 18 fails on Windows
# 3. Python >= 3.12 fails on Node.js 16 because of distlib fixed in node-gyp v10.0
# 4. `npm test` fails with: npm ERR! Missing script: "test"
# 5. `node-gyp rebuild` fails on Node.js 16

name: CI

on: [push, pull_request]
Expand All @@ -8,26 +20,33 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, latest]
os: [windows-latest, ubuntu-latest, macos-latest]
node-version: [18.x, 20.x] # , latest] Node.js >= 21 fails
os: [ubuntu-latest, macos-latest]
include: # Node.js > 16.x fails on Windows
- node-version: 16.x
os: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
with: # Python >= 3.12 fails on Node.js 16 because of distlib fixed in node-gyp v10.0
python-version: 3.11
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: install dependencies and test
- run: |
node-gyp --version || true
npm install --global node-gyp
node-gyp --version
shell: bash
run: |
- run: |
npm install
npm test
- name: build with node-gyp
npm test || true # npm ERR! Missing script: "test"
shell: bash
- run: node-gyp configure
shell: bash
- if: matrix.node-version != '16.x'
run: node-gyp rebuild
shell: bash
run: |
# npm install -g node-gyp
node-gyp configure
node-gyp rebuild