Skip to content

Commit 8513232

Browse files
joaocgreisMyles Borins
authored and
Myles Borins
committed
build: split CI rules in Makefile
Some CI jobs compile Node and run the tests on different machines. This change enables collaborators to have finer control over what runs on these jobs, such as the exact suites to run. The test-ci rule was split into js and native, to allow for addons to be compiled only on the machines that are going to run them. Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Rod Vagg <[email protected]> PR-URL: #7317
1 parent 9aec1dd commit 8513232

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

Makefile

+21-3
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,24 @@ test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
166166
test-all-valgrind: test-build
167167
$(PYTHON) tools/test.py --mode=debug,release --valgrind
168168

169+
CI_NATIVE_SUITES := addons
170+
CI_JS_SUITES := doctool message parallel sequential
171+
172+
# Build and test addons without building anything else
173+
test-ci-native: | test/addons/.buildstamp
174+
$(PYTHON) tools/test.py -p tap --logfile test.tap \
175+
--mode=release --flaky-tests=$(FLAKY_TESTS) \
176+
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)
177+
178+
# This target should not use a native compiler at all
179+
test-ci-js:
180+
$(PYTHON) tools/test.py -p tap --logfile test.tap \
181+
--mode=release --flaky-tests=$(FLAKY_TESTS) \
182+
$(TEST_CI_ARGS) $(CI_JS_SUITES)
183+
169184
test-ci: | build-addons
170185
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \
171-
$(TEST_CI_ARGS) addons doctool message parallel sequential
186+
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES) $(CI_JS_SUITES)
172187

173188
test-release: test-build
174189
$(PYTHON) tools/test.py --mode=release
@@ -265,9 +280,11 @@ docopen: out/doc/api/all.html
265280
docclean:
266281
-rm -rf out/doc
267282

268-
run-ci:
283+
build-ci:
269284
$(PYTHON) ./configure $(CONFIG_FLAGS)
270285
$(MAKE)
286+
287+
run-ci: build-ci
271288
$(MAKE) test-ci
272289

273290
RAWVER=$(shell $(PYTHON) tools/getnodeversion.py)
@@ -650,4 +667,5 @@ lint-ci: lint
650667
blog blogclean tar binary release-only bench-http-simple bench-idle \
651668
bench-all bench bench-misc bench-array bench-buffer bench-net \
652669
bench-http bench-fs bench-tls cctest run-ci lint-ci bench-ci \
653-
test-v8 test-v8-intl test-v8-benchmarks test-v8-all v8 $(TARBALL)-headers
670+
test-v8 test-v8-intl test-v8-benchmarks test-v8-all v8 \
671+
$(TARBALL)-headers test-ci test-ci-native test-ci-js build-ci

0 commit comments

Comments
 (0)