ci: add Node.js 23 and 26 to build and test matrices#27
Open
aborovsky wants to merge 6 commits into
Open
Conversation
- Add node versions 23 and 26 to the matrix in build-and-release.yaml and build-lint-test.yaml, bringing coverage in line with node-raw-socket - Node 23: sync parity with node-raw-socket which already covered it - Node 26 (Current release, future LTS Oct 2026): ensures prebuilt binaries are produced and tested ahead of its LTS promotion - Matrix order is now [26, 25, 24, 23, 22] (descending)
aborovsky
force-pushed
the
feat/node-23-26-coverage
branch
from
June 9, 2026 05:54
7113d98 to
3a77c3a
Compare
vitest.config.ts: - Add retry: 2 to automatically retry flaky network-dependent tests (CurlMime stream tests intermittently hang due to local HTTP server timing on ubuntu-22.04 and alpine runners) scripts/vcpkg-setup.js: - Skip the 'http3' vcpkg feature when the resolved OpenSSL version is < 3.5, mirroring the conditional logic already present in build.sh. ngtcp2 requires QUIC-capable OpenSSL (>= 3.5); building it against OpenSSL 3.0.x fails with 'Unable to build OpenSSL backend due to lack of QUIC support' (LNK1117 on MSVC via ngtcp2 CMakeLists.txt) scripts/ci/build-zlib.sh: - Add a 4-part version extraction step (e.g. 1.3.0.1 from 1.3.0.1-motley) as an intermediate download fallback before the 3-part version. Node 23 ships zlib 1.3.0.1-motley; the previous logic resolved this to 1.3.0 whose source fails to compile on macOS 15 with universal arch flags. Tag v1.3.0.1 exists on madler/zlib and compiles cleanly.
scripts/vcpkg-setup.js: - Collapse two-line expression onto one line to satisfy prettier scripts/ci/build.sh: - On macOS, override ZLIB_RELEASE to 1.3.1 when Node.js bundles zlib 1.3.0.x (e.g. 1.3.0.1-motley in Node 23). zlib 1.3.0 and 1.3.0.1 fail to compile on macOS 15 with Xcode 16 universal arch flags due to an assembler issue fixed in zlib 1.3.1.
…de 26 Node 26 switched its official Windows build to ClangCL + ThinLTO, so common.gypi now injects -flto=thin (compiler) and opt:lldltojobs=N (linker) into every Release target. MSVC's cl.exe tolerates -flto=thin (emits warning D9002 and moves on), but link.exe fatally rejects opt:lldltojobs=N with LNK1117 'syntax error in option'. Use GYP's regex-exclude syntax (AdditionalOptions/) in a top-level target_defaults block to strip both flags from all three MSVC tools (VCCLCompilerTool, VCLibrarianTool, VCLinkerTool) in Release builds. This block is entirely inert on the Linux and macOS generators.
ngtcp2 uses C11 atomics that are not fully supported by the Alpine GCC toolchain targeting musl libc. When OpenSSL >= 3.5 is present (Node 26 on Alpine), build.sh was unconditionally building nghttp3 and ngtcp2, which then caused a link error when compiling libcurl. Add an Alpine detection guard alongside the OpenSSL >= 3.5 check: HTTP/3 deps are now only built when both conditions hold AND the OS is not Alpine/musl. This mirrors the existing 'no-async' workaround already applied to the OpenSSL build on Alpine at line 186-188 of build.sh.
There was a problem hiding this comment.
Pull request overview
Expands CI coverage to newer Node.js versions by adding Node 23 and 26 to the build/test matrices, and adjusts CI/build tooling to handle issues uncovered by the wider matrix (Alpine image availability, Windows LTO flags, OpenSSL/HTTP3 compatibility, and zlib build quirks on macOS).
Changes:
- Add Node.js
23and26to GitHub Actions build/test matrices (and select Alpine 3.22 containers for Node 26). - Improve CI robustness: retry flaky Vitest tests, and adjust dependency build scripts for HTTP/3, OpenSSL, and zlib edge cases.
- Update Windows build configuration to avoid MSVC failures caused by Node 26 injecting ThinLTO/LLD flags.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/build-and-release.yaml |
Adds Node 23/26 to matrix; switches Alpine container tag to 3.22 for Node 26+. |
.github/workflows/build-lint-test.yaml |
Adds Node 23/26 to matrix; switches Alpine container tag to 3.22 for Node 26+. |
vitest.config.ts |
Adds retry: 2 to reduce flake from network-dependent tests. |
scripts/vcpkg-setup.js |
Disables vcpkg curl http3 feature when OpenSSL < 3.5 to avoid incompatible builds. |
scripts/ci/build.sh |
Skips HTTP/3 deps on Alpine/musl; normalizes/overrides zlib on macOS when Node bundles 1.3.0.x. |
scripts/ci/build-zlib.sh |
Adds 4-part version fallback for zlib downloads/unpack naming. |
binding.gyp |
Strips ThinLTO/LLD-related flags from MSVC toolchains for Node 26 compatibility. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Bump coverage job from Node 24 to Node 26 (now the latest stable in matrix) - Clarify zlib comment: version defaults to Node's bundled one but is overridden on macOS 15 when 1.3.0.x is detected
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Node.js 23 and 26 to the CI build and test matrices in both
build-and-release.yamlandbuild-lint-test.yaml, and fixes several pre-existing CI issues exposed by the wider matrix.Changes
.github/workflows/build-and-release.yaml23and26to thenodematrix array.github/workflows/build-lint-test.yaml23and26to thenodematrix array; Alpine container usesalpine3.22for Node 26 (alpine3.21has no Node 26 image)vitest.config.tsretry: 2to auto-retry flaky network-dependent testsscripts/vcpkg-setup.jshttp3vcpkg feature when resolved OpenSSL < 3.5 (ngtcp2 requires QUIC-capable OpenSSL; avoids LNK1117 on MSVC)scripts/ci/build.shZLIB_RELEASEto1.3.1when Node.js bundles1.3.0.x(1.3.0 fails on macOS 15 / Xcode 16 universal arch flags; fixed in 1.3.1)scripts/ci/build.shscripts/ci/build-zlib.sh1.3.0.1-motleybinding.gyp-flto=thin,opt:lldltojobs=N) from MSVC tool chains; Node 26'scommon.gypiinjects these ClangCL-only flags which MSVC'slink.exerejects with LNK1117New matrix order:
[26, 25, 24, 23, 22](descending)Rationale
node-raw-socketalready ships prebuilds for Node 23 — adding it here brings coverage parity between the two repos.CI Status
28/28 jobs passing ✅