Skip to content

ci: add Node.js 23 and 26 to build and test matrices#27

Open
aborovsky wants to merge 6 commits into
masterfrom
feat/node-23-26-coverage
Open

ci: add Node.js 23 and 26 to build and test matrices#27
aborovsky wants to merge 6 commits into
masterfrom
feat/node-23-26-coverage

Conversation

@aborovsky

@aborovsky aborovsky commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds Node.js 23 and 26 to the CI build and test matrices in both build-and-release.yaml and build-lint-test.yaml, and fixes several pre-existing CI issues exposed by the wider matrix.

Changes

File Change
.github/workflows/build-and-release.yaml Added 23 and 26 to the node matrix array
.github/workflows/build-lint-test.yaml Added 23 and 26 to the node matrix array; Alpine container uses alpine3.22 for Node 26 (alpine3.21 has no Node 26 image)
vitest.config.ts Added retry: 2 to auto-retry flaky network-dependent tests
scripts/vcpkg-setup.js Skip http3 vcpkg feature when resolved OpenSSL < 3.5 (ngtcp2 requires QUIC-capable OpenSSL; avoids LNK1117 on MSVC)
scripts/ci/build.sh On macOS, override ZLIB_RELEASE to 1.3.1 when Node.js bundles 1.3.0.x (1.3.0 fails on macOS 15 / Xcode 16 universal arch flags; fixed in 1.3.1)
scripts/ci/build.sh Skip HTTP/3 deps (ngtcp2/nghttp3) on Alpine/musl (C11 atomics incompatibility causes libcurl compile failure)
scripts/ci/build-zlib.sh Add 4-part version extraction as intermediate download fallback for versions like 1.3.0.1-motley
binding.gyp Strip ThinLTO/LLD linker flags (-flto=thin, opt:lldltojobs=N) from MSVC tool chains; Node 26's common.gypi injects these ClangCL-only flags which MSVC's link.exe rejects with LNK1117

New matrix order: [26, 25, 24, 23, 22] (descending)

Rationale

  • Node 23 (EOL May 2025): node-raw-socket already ships prebuilds for Node 23 — adding it here brings coverage parity between the two repos.
  • Node 26 (Current release, future LTS Oct 2026): ensures prebuilt binaries are produced and tested ahead of LTS promotion.
  • Node 25 is intentionally kept (not removed) per project policy.

CI Status

28/28 jobs passing

- 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
aborovsky force-pushed the feat/node-23-26-coverage branch from 7113d98 to 3a77c3a Compare June 9, 2026 05:54
@aborovsky aborovsky self-assigned this Jun 9, 2026
aborovsky added 4 commits June 9, 2026 07:56
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.
@aborovsky
aborovsky marked this pull request as ready for review June 9, 2026 11:10
@aborovsky
aborovsky requested a review from Copilot June 9, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 23 and 26 to 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.

Comment thread .github/workflows/build-lint-test.yaml
Comment thread scripts/ci/build.sh Outdated
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants