You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore: Upgrade support to node 22 and 24
We are also upgrading the minimum engine to 22,
and the dependencies we use for CodeQL to 24, as it's
going to be our baseline from now on.
* chore: use devtools toolchain on linux and upgrade macos deps
* chore: add brotli as a dependency when compiling the test
* chore: Remove unsupported flags for r/o heaps
According to a v8 commit, v8 removed the ability
to build without shared r/o heaps.
More info: https://chromium-review.googlesource.com/c/v8/v8/+/6038531
* chore: use 22 until we have 24
* chore: create parent node folder, necessary for the symlink
* chore: upgrade node-gyp to the latest
* chore: upgrade test template to node 24 and std=c++20
* chore: remove assert(CanUseCustomSnapshotPerIsolate)
We only use one EmbedderSnapshotData and one Isolate, so we are
not hitting the corner case of having isolates with different
snapshots.
* chore: forgot to remove the test skip
* chore: unregister isolate *after* disposing isolate
Refs: nodejs/node@9aa1afb
Refs: nodejs/node@5d3e1b5
* feat!: remove support code for older Node.js versions
* chore: add evergreen task for testing dchecks
* chore: use ubuntu instead of amazon for dcheck runs
* fixup: use fixed version of weak-napi
* chore: upgrade to vs2022 to test
* chore: upgrade host so it has msvc 2022
* chore: typo in the evergreen distro
* chore(ci): use llvm from homebrew on evergreen macOS
* chore: Use python3.11 in windows host
* chore: make sure python 3.11 is used everywhere, also when compiling
* chore: make sure that the hash is updated so it uses the proper python version
* chore: also setup python and python3 env vars for node-gyp
* chore: use NODE_GYP_FORCE_PYTHON
* chore: use windows path and simplify
* chore: normalise to spaces
* chore: untabify, use spaces always
* chore: setup VC environment and upgrade command args for vcbuild
* chore: stub APPDATA env var
* chore: adapt it to use CMD properly
* chore: fix order of parameters
* chore: we still need to projgen
* chore: do not use $TEMP because files there can be deleted
* chore: typo :(
* chore: upgrade to node 24 (the LTS) and increase timeout
The build in Windows is slower, so we increase the timeout
to avoid issues related to slow compilation
* chore: use the same base in all machines (22.17.0)
* chore: setup windows tests also in GHA for faster feedback
This also adds a baseline: if the tests without special setup
work here, it should work also in evergreen hosts if properly
configured.
* chore: remove unused deps and remove setup of MSVC DevTools
In theory vcbuild.bat should detect where the MSVC DevTools
are located (using vswhere.exe) and setup them correctly. We
are going to verify this behaviour.
* chore: support all architecture flags
* chore: increase timeout (default is 6h, builds can take more time)
* chore: fix linter issues
* chore: use DEBUG, as it's faster, and it's good enough for a safety check
* chore: split each test in it's own job to avoid disk space issues
* chore: we can't use cache: npm because we don't have a package-lock
* chore: delete precompiled headers on windows and node24>
Compiling with a snapshot requires compiling twice: a base image
and the image with the snapshot embedded. In that situation, clang-cl
complains that there are precompiled headers that changed between
compilations and does not refresh them, but kills the compilation
process with an error. Due to this, before attempting the second
compilation, we will delete all pch files.
* chore: Remove test, now the behaviour is tested by the compiler
This test was written so we could speed up the feedback loop.
* chore: use rimraf instead of custom code, it should be easier to maintain
* chore: Generate the GHA workflow from a template
Because we can keep adding more tests, maintaining the GHA workflow
can become a bit cumbersome. This script generates the GHA file
from a template, and adds all the test cases in a matrix. We do this
because each test is expensive in time and disk space, so we do
sometimes hit the GHA limit of 6h or the we fill the disk.
* chore: Fix linter issues (spacing and unused deps)
* chore: use -f instead of -g for the test runner
It seems that -g expects a regular expression, and
if the regular expression is invalid, mocha just fails
with Error: null. Using -f, uses a substring comparison,
which is what we need.
* chore: Remove pch files from compilation artifacts in tmp directory
* chore: Print the folder where we are deleting pchs from
* chore: attempt to upgrade rimraf to latest version
* chore: Use follow: true, so it follows symlinks and junctions
* chore: resolve the realpath of nodeSourcePath before deleting pchs
nodeSourcePath in Windows refers to a user directory that contains
an alias. For example, something like C:\Users\RUNNER~1 (in GHA) while
MSVC uses the full name like C:\Users\runneradmin. This can make
rimraf not delete the pch files properly. By resolving first, we make
sure that both paths are absolute and unambiguous.
* chore: Remove all directories that can contain compilation outputs
clang-cl does not properly handle pch refresh when a source header
changed after the pch file was generated
* chore: try to delete the whole out directory for a fresh compilation
* chore: Simplify naming, we now wipe out the whole out directory
This will force Node.js to compile from scratch. It's slower, but
it will only happens on Windows and it will be safer and more
reliable there.
* chore: ensure that any output directory is cleaned up before compiling
Right now it's failing on the first compilation of the second test, as
we are not doing any clean up. To ensure that we are in a consistent
state in Windows, before attempting compiling, we will make sure we
don't have any old compilation artifact.
This might slow down Windows compilations as they can't reuse cached
files.
---------
Co-authored-by: Anna Henningsen <anna@addaleax.net>
Copy file name to clipboardExpand all lines: .github/workflows/nodejs.yml
+47-7Lines changed: 47 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
# This is a generated file. Please change .github/workflows/nodejs.yml.in
2
+
# and run the following command to update the GHA Workflow
3
+
# $> npm run update-gha-workflow
4
+
# --------------------
1
5
on: [pull_request]
2
6
3
7
name: CI
@@ -13,19 +17,55 @@ jobs:
13
17
fail-fast: false
14
18
matrix:
15
19
os: [ubuntu-latest]
16
-
node-version: [14.x, 16.x, 18.x, 20.x]
20
+
node-version: [20.x, 22.x, 24.x]
21
+
test-to-run: ["works in a simple case","works with a Nan addon","works with a N-API addon","passes through env vars and runs the pre-compile hook","works with code caching support","works with snapshot support (compressBlobs = "]
17
22
runs-on: ${{ matrix.os }}
18
23
steps:
19
-
- uses: actions/checkout@v2
24
+
- uses: actions/checkout@v5
20
25
- name: Use Node.js ${{ matrix.node-version }}
21
-
uses: actions/setup-node@v2
26
+
uses: actions/setup-node@v6
22
27
with:
23
28
check-latest: true
24
29
node-version: ${{ matrix.node-version }}
25
-
- name: Install npm@8.x
26
-
if: ${{ matrix.node-version == '14.x' }}
27
-
run: npm install -g npm@8.x
28
30
- name: Install Dependencies
29
31
run: npm install
32
+
- name: Lint
33
+
run: npm run lint
34
+
- name: Build
35
+
run: npm run build
30
36
- name: Test
31
-
run: npm test
37
+
run: npm run test-ci -- -f "${{ matrix.test-to-run }}"
38
+
39
+
test-windows:
40
+
name: Windows tests
41
+
strategy:
42
+
fail-fast: false
43
+
matrix:
44
+
os: [windows-latest]
45
+
node-version: [20.x, 22.x, 24.x]
46
+
vs-version: ['17'] # 17 => VS2022
47
+
test-to-run: ["works in a simple case","works with a Nan addon","works with a N-API addon","passes through env vars and runs the pre-compile hook","works with code caching support","works with snapshot support (compressBlobs = "]
48
+
runs-on: ${{ matrix.os }}
49
+
steps:
50
+
- uses: actions/checkout@v5
51
+
- name: Use Node.js ${{ matrix.node-version }}
52
+
uses: actions/setup-node@v6
53
+
with:
54
+
check-latest: true
55
+
node-version: ${{ matrix.node-version }}
56
+
- uses: microsoft/setup-msbuild@v2
57
+
name: Setup MSBuild
58
+
with:
59
+
vs-version: ${{ matrix.vs-version }}
60
+
msbuild-architecture: x64
61
+
- name: Install Dependencies
62
+
run: npm install
63
+
- name: Lint
64
+
run: npm run lint
65
+
- name: Build
66
+
run: npm run build
67
+
- name: Test
68
+
run: npm run test-ci -- -f "${{ matrix.test-to-run }}"
0 commit comments