diff --git a/Jenkinsfile b/Jenkinsfile index 2c59265bb..f8da394af 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,9 +1,43 @@ -node('linux') { - stage('Clone') { +def runStages() { + stage("Clone") { + /* The Git repo seems to be cached in some Jenkins plugin, so this is not always a clean clone. */ checkout scm + sh "make build-system-checks || true" } - stage('Build') { - sh 'echo "nproc:"; nproc' + stage("Build") { + sh "make -j${env.NPROC} update" /* to allow a newer Nim version to be detected */ + sh "make -j${env.NPROC} V=1 deps" /* to allow the following parallel stages */ + } + stage("Test") { + parallel( + "tools": { + stage("Tools") { + sh "make -j${env.NPROC}" + } + }, + "test suite": { + stage("Test suite") { + sh "make -j${env.NPROC} test" + } + } + ) } } +parallel( + "Linux": { + node("linux") { + withEnv(["NPROC=${sh(returnStdout: true, script: 'nproc').trim()}"]) { + runStages() + } + } + }, + "macOS": { + node("macos") { + withEnv(["NPROC=${sh(returnStdout: true, script: 'sysctl -n hw.logicalcpu').trim()}"]) { + runStages() + } + } + } +) + diff --git a/Makefile b/Makefile index 9a9c15b59..e01464f2d 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ BUILD_SYSTEM_DIR := vendor/nimbus-build-system # we don't want an error here, so we can handle things later, in the build-system-checks target -include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk -TOOLS := beacon_node bench_bls_sig_agggregation state_sim ncli_hash_tree_root ncli_pretty ncli_signing_root ncli_transition process_dashboard deposit_contract +TOOLS := beacon_node bench_bls_sig_agggregation ncli_hash_tree_root ncli_pretty ncli_signing_root ncli_transition process_dashboard deposit_contract TOOLS_DIRS := beacon_chain benchmarks research ncli tests/simulation TOOLS_CSV := $(subst $(SPACE),$(COMMA),$(TOOLS)) diff --git a/vendor/nim-nat-traversal b/vendor/nim-nat-traversal index 68ed95957..e3fd23e90 160000 --- a/vendor/nim-nat-traversal +++ b/vendor/nim-nat-traversal @@ -1 +1 @@ -Subproject commit 68ed95957d614fa91d0b20bdeea3cf876c46c120 +Subproject commit e3fd23e90f661f51f028f78202eb4de1e6128ea9 diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index 28e88efad..a13a7efa9 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit 28e88efada2ae62cecf51b29ea52c69d842db051 +Subproject commit a13a7efa9fd3bb2fdd2537821b0f687296f8d461