This repository has been archived by the owner on Dec 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (48 loc) · 1.55 KB
/
configure.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# 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]
jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
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 >= 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 }}
- run: |
node-gyp --version || true
npm install --global node-gyp
node-gyp --version
shell: bash
- run: |
npm install
npm test || true # npm ERR! Missing script: "test"
shell: bash
- run: node-gyp configure
shell: bash
- if: matrix.node-version != 16
run: node-gyp rebuild
shell: bash