Skip to content

Commit

Permalink
Merge branch 'nodejs:main' into assert-make-myers-more-performant
Browse files Browse the repository at this point in the history
  • Loading branch information
puskin94 authored Jan 9, 2025
2 parents f719438 + 6b3937a commit 31c27d3
Show file tree
Hide file tree
Showing 584 changed files with 34,238 additions and 7,182 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ updates:
interval: monthly
commit-message:
prefix: meta
open-pull-requests-limit: 10
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}

- package-ecosystem: npm
directory: /tools/eslint
schedule:
interval: monthly
commit-message:
prefix: tools
open-pull-requests-limit: 10
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
groups:
eslint:
applies-to: version-updates
Expand All @@ -29,7 +29,7 @@ updates:
interval: monthly
commit-message:
prefix: tools
open-pull-requests-limit: 10
open-pull-requests-limit: ${{secrets.OPEN_PR_LIMIT}}
groups:
lint-md:
applies-to: version-updates
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
path: node
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
Expand All @@ -51,6 +52,13 @@ jobs:
- name: Environment Information
run: npx envinfo
- name: Build
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
run: make -C node build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn"
- name: Test
run: make run-ci -j4 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
run: make -C node run-ci -j4 V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
- name: Re-run test in a folder whose name contains unusual chars
run: |
mv node "$DIR"
cd "$DIR"
./tools/test.py --flaky-tests keep_retrying -p actions -j 4
env:
DIR: dir%20with $unusual"chars?'åß∂ƒ©∆¬…`
20 changes: 16 additions & 4 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ permissions:
jobs:
test-macOS:
if: github.event.pull_request.draft == false
runs-on: macos-14
strategy:
fail-fast: false
matrix:
macos-version: [macos-13, macos-14]
runs-on: ${{ matrix.macos-version }}
env:
CC: sccache gcc
CXX: sccache g++
Expand All @@ -47,6 +51,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
path: node
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
Expand All @@ -64,7 +69,7 @@ jobs:
# happen anymore running this step here first, that's also useful
# information.)
- name: tools/doc/node_modules workaround
run: make tools/doc/node_modules
run: make -C node tools/doc/node_modules
# This is needed due to https://github.com/nodejs/build/issues/3878
- name: Cleanup
run: |
Expand All @@ -80,8 +85,15 @@ jobs:
df -h
echo "::endgroup::"
- name: Build
run: make build-ci -j$(getconf _NPROCESSORS_ONLN) V=1 CONFIG_FLAGS="--error-on-warn"
run: make -C node build-ci -j$(getconf _NPROCESSORS_ONLN) V=1 CONFIG_FLAGS="--error-on-warn"
- name: Free Space After Build
run: df -h
- name: Test
run: make run-ci -j$(getconf _NPROCESSORS_ONLN) V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
run: make -C node run-ci -j$(getconf _NPROCESSORS_ONLN) V=1 TEST_CI_ARGS="-p actions --node-args='--test-reporter=spec' --node-args='--test-reporter-destination=stdout' --measure-flakiness 9"
- name: Re-run test in a folder whose name contains unusual chars
run: |
mv node "$DIR"
cd "$DIR"
./tools/test.py --flaky-tests keep_retrying -p actions -j 4
env:
DIR: dir%20with $unusual"chars?'åß∂ƒ©∆¬…`
4 changes: 2 additions & 2 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
| Binary package | Platform and Toolchain |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 12[^5] |
| darwin-x64 | macOS 11, Xcode 13 with -mmacosx-version-min=11.0 |
| darwin-arm64 (and .pkg) | macOS 11 (arm64), Xcode 13 with -mmacosx-version-min=11.0 |
| darwin-x64 | macOS 13, Xcode 16 with -mmacosx-version-min=11.0 |
| darwin-arm64 (and .pkg) | macOS 13 (arm64), Xcode 14 with -mmacosx-version-min=11.0 |
| linux-arm64 | RHEL 8 with gcc-toolset-12[^6] |
| linux-armv7l | Cross-compiled on RHEL 9 x64 with a [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools)[^7] |
| linux-ppc64le | RHEL 8 with gcc-toolset-12[^6] |
Expand Down
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.4.0">23.4.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V23.md#23.6.0">23.6.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.5.0">23.5.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.4.0">23.4.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.3.0">23.3.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.2.0">23.2.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.1.0">23.1.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V23.md#23.0.0">23.0.0</a><br/>
</td>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.12.0">22.12.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V22.md#22.13.0">22.13.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.12.0">22.12.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.11.0">22.11.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.10.0">22.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V22.md#22.9.0">22.9.0</a><br/>
Expand Down
51 changes: 44 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ coverage-report-js: ## Report JavaScript coverage results.
cctest: all ## Run the C++ tests using the built `cctest` executable.
@out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER)
$(NODE) ./test/embedding/test-embedding.js
$(NODE) ./test/sqlite/test-sqlite-extensions.mjs

.PHONY: list-gtests
list-gtests: ## List all available C++ gtests.
Expand All @@ -312,7 +311,7 @@ v8: ## Build deps/v8.
tools/make-v8.sh $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)

.PHONY: jstest
jstest: build-addons build-js-native-api-tests build-node-api-tests ## Run addon tests and JS tests.
jstest: build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests ## Run addon tests and JS tests.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
$(TEST_CI_ARGS) \
--skip-tests=$(CI_SKIP_TESTS) \
Expand All @@ -338,6 +337,7 @@ test: all ## Run default tests, linters, and build docs.
$(MAKE) -s build-addons
$(MAKE) -s build-js-native-api-tests
$(MAKE) -s build-node-api-tests
$(MAKE) -s build-sqlite-tests
$(MAKE) -s cctest
$(MAKE) -s jstest

Expand All @@ -346,6 +346,7 @@ test-only: all ## Run default tests, without linters or building the docs.
$(MAKE) build-addons
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
$(MAKE) build-sqlite-tests
$(MAKE) cctest
$(MAKE) jstest
$(MAKE) tooltest
Expand All @@ -356,6 +357,7 @@ test-cov: all ## Run coverage tests.
$(MAKE) build-addons
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
$(MAKE) build-sqlite-tests
$(MAKE) cctest
CI_SKIP_TESTS=$(COV_SKIP_TESTS) $(MAKE) jstest

Expand Down Expand Up @@ -501,6 +503,23 @@ benchmark/napi/.buildstamp: $(ADDONS_PREREQS) \
$(BENCHMARK_NAPI_BINDING_GYPS) $(BENCHMARK_NAPI_BINDING_SOURCES)
@$(call run_build_addons,"$$PWD/benchmark/napi",$@)

SQLITE_BINDING_GYPS := $(wildcard test/sqlite/*/binding.gyp)

SQLITE_BINDING_SOURCES := \
$(wildcard test/sqlite/*/*.c)

# Implicitly depends on $(NODE_EXE), see the build-sqlite-tests rule for rationale.
test/sqlite/.buildstamp: $(ADDONS_PREREQS) \
$(SQLITE_BINDING_GYPS) $(SQLITE_BINDING_SOURCES)
@$(call run_build_addons,"$$PWD/test/sqlite",$@)

.PHONY: build-sqlite-tests
# .buildstamp needs $(NODE_EXE) but cannot depend on it
# directly because it calls make recursively. The parent make cannot know
# if the subprocess touched anything so it pessimistically assumes that
# .buildstamp is out of date and need a rebuild.
build-sqlite-tests: | $(NODE_EXE) test/sqlite/.buildstamp ## Build SQLite tests.

.PHONY: clear-stalled
clear-stalled: ## Clear any stalled processes.
$(info Clean up any leftover processes but don't error if found.)
Expand All @@ -511,14 +530,18 @@ clear-stalled: ## Clear any stalled processes.
fi

.PHONY: test-build
test-build: | all build-addons build-js-native-api-tests build-node-api-tests ## Build all tests.
test-build: | all build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests ## Build all tests.

.PHONY: test-build-js-native-api
test-build-js-native-api: all build-js-native-api-tests ## Build JS Native-API tests.

.PHONY: test-build-node-api
test-build-node-api: all build-node-api-tests ## Build Node-API tests.

.PHONY: test-build-sqlite
test-build-sqlite: all build-sqlite-tests ## Build SQLite tests.


.PHONY: test-all
test-all: test-build ## Run default tests with both Debug and Release builds.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release
Expand Down Expand Up @@ -546,7 +569,7 @@ endif

# Related CI job: node-test-commit-arm-fanned
test-ci-native: LOGLEVEL := info ## Build and test addons without building anything else.
test-ci-native: | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp
test-ci-native: | benchmark/napi/.buildstamp test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/sqlite/.buildstamp
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
Expand All @@ -569,13 +592,12 @@ test-ci-js: | clear-stalled ## Build and test JavaScript with building anything
.PHONY: test-ci
# Related CI jobs: most CI tests, excluding node-test-commit-arm-fanned
test-ci: LOGLEVEL := info ## Build and test everything (CI).
test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests doc-only
test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tests build-node-api-tests build-sqlite-tests doc-only
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
$(NODE) ./test/embedding/test-embedding.js
$(NODE) ./test/sqlite/test-sqlite-extensions.mjs
$(info Clean up any leftover processes, error if found.)
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
Expand Down Expand Up @@ -609,6 +631,10 @@ test-debug: BUILDTYPE_LOWER=debug ## Run tests on a debug build.
test-release test-debug: test-build ## Run tests on a release or debug build.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER)

.PHONY: test-test426
test-test426: all ## Run the Web Platform Tests.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) test426

.PHONY: test-wpt
test-wpt: all ## Run the Web Platform Tests.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt
Expand Down Expand Up @@ -677,6 +703,16 @@ test-node-api-clean: ## Remove Node-API testing artifacts.
$(RM) -r test/node-api/*/build
$(RM) test/node-api/.buildstamp

.PHONY: test-sqlite
test-sqlite: test-build-sqlite ## Run SQLite tests.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) sqlite

.PHONY: test-sqlite-clean
.NOTPARALLEL: test-sqlite-clean
test-sqlite-clean: ## Remove SQLite testing artifacts.
$(RM) -r test/sqlite/*/build
$(RM) test/sqlite/.buildstamp

.PHONY: test-addons
test-addons: test-build test-js-native-api test-node-api ## Run addon tests.
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) addons
Expand Down Expand Up @@ -1442,7 +1478,7 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \
test/cctest/*.h \
test/embedding/*.cc \
test/embedding/*.h \
test/sqlite/*.c \
test/sqlite/*/*.c \
test/fixtures/*.c \
test/js-native-api/*/*.cc \
test/node-api/*/*.cc \
Expand All @@ -1466,6 +1502,7 @@ FORMAT_CPP_FILES += $(wildcard \
test/js-native-api/*/*.h \
test/node-api/*/*.c \
test/node-api/*/*.h \
test/sqlite/*/*.c \
)

# Code blocks don't have newline at the end,
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ For information about the governance of the Node.js project, see
**Matteo Collina** <<[email protected]>> (he/him)
* [mhdawson](https://github.com/mhdawson) -
**Michael Dawson** <<[email protected]>> (he/him)
* [MoLow](https://github.com/MoLow) -
**Moshe Atlow** <<[email protected]>> (he/him)
* [RafaelGSS](https://github.com/RafaelGSS) -
**Rafael Gonzaga** <<[email protected]>> (he/him)
* [richardlau](https://github.com/richardlau) -
Expand Down Expand Up @@ -211,6 +209,8 @@ For information about the governance of the Node.js project, see
**Shelley Vohr** <<[email protected]>> (she/her)
* [GeoffreyBooth](https://github.com/GeoffreyBooth) -
**Geoffrey Booth** <<[email protected]>> (he/him)
* [MoLow](https://github.com/MoLow) -
**Moshe Atlow** <<[email protected]>> (he/him)
* [Trott](https://github.com/Trott) -
**Rich Trott** <<[email protected]>> (he/him)

Expand Down Expand Up @@ -451,8 +451,6 @@ For information about the governance of the Node.js project, see
**Vladimir Morozov** <<[email protected]>> (he/him)
* [VoltrexKeyva](https://github.com/VoltrexKeyva) -
**Mohammed Keyvanzadeh** <<[email protected]>> (he/him)
* [watilde](https://github.com/watilde) -
**Daijiro Wachi** <<[email protected]>> (he/him)
* [zcbenz](https://github.com/zcbenz) -
**Cheng Zhao** <<[email protected]>> (he/him)
* [ZYSzys](https://github.com/ZYSzys) -
Expand Down Expand Up @@ -707,6 +705,8 @@ For information about the governance of the Node.js project, see
**Vladimir Kurchatkin** <<[email protected]>>
* [vsemozhetbyt](https://github.com/vsemozhetbyt) -
**Vse Mozhet Byt** <<[email protected]>> (he/him)
* [watilde](https://github.com/watilde) -
**Daijiro Wachi** <<[email protected]>> (he/him)
* [watson](https://github.com/watson) -
**Thomas Watson** <<[email protected]>>
* [whitlockjc](https://github.com/whitlockjc) -
Expand Down
Loading

0 comments on commit 31c27d3

Please sign in to comment.