From ee3f466dfe435436fc262509c55791df4cd19f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Thu, 11 Feb 2021 20:03:29 +0100 Subject: [PATCH] CI, dist: faster Nim compiler builds --- .github/workflows/ci.yml | 8 ++------ Jenkinsfile | 14 +++++++------- docker/dist/entry_point.sh | 2 ++ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c39f1f44..b3ec80120 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -215,10 +215,6 @@ jobs: getHash() { git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1 } - # nimHash=$(getHash nim-lang/Nim '${{ matrix.branch }}') - # csourcesHash=$(getHash nim-lang/csources) - # echo "::set-output name=nim::$nimHash" - # echo "::set-output name=csources::$csourcesHash" nbsHash=$(getHash status-im/nimbus-build-system) echo "::set-output name=nimbus_build_system::$nbsHash" @@ -229,11 +225,11 @@ jobs: path: nim-beacon-chain/NimBinaries key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}' - - name: Build Nim and NBC dependencies + - name: Build Nim and Nimbus dependencies shell: bash working-directory: nim-beacon-chain run: | - make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries V=1 update + make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries QUICK_AND_DIRTY_COMPILER=1 update - name: Get latest fixtures commit hash if: matrix.target.TEST_KIND == 'unit-tests' diff --git a/Jenkinsfile b/Jenkinsfile index 3283b4762..6df4c0d5e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,9 +25,9 @@ def runStages() { stage("Build") { sh """#!/bin/bash set -e - make -j${env.NPROC} V=1 update # to allow a newer Nim version to be detected - make -j${env.NPROC} V=1 deps # to allow the following parallel stages - V=1 ./scripts/setup_official_tests.sh jsonTestsCache + # to allow the following parallel stages + make -j${env.NPROC} QUICK_AND_DIRTY_COMPILER=1 deps + ./scripts/setup_official_tests.sh jsonTestsCache """ } } @@ -38,16 +38,16 @@ def runStages() { stage("Tools") { sh """#!/bin/bash set -e - make -j${env.NPROC} V=1 - make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node + make -j${env.NPROC} + make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node # Miracl fallback - # make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node + # make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node """ } }, "test suite": { stage("Test suite") { - sh "make -j${env.NPROC} V=1 DISABLE_TEST_FIXTURES_SCRIPT=1 test" + sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test" } stage("testnet finalization") { // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node diff --git a/docker/dist/entry_point.sh b/docker/dist/entry_point.sh index d5068e980..a152bfffa 100755 --- a/docker/dist/entry_point.sh +++ b/docker/dist/entry_point.sh @@ -28,6 +28,7 @@ if [[ "${PLATFORM}" == "Windows_amd64" ]]; then make \ -j$(nproc) \ USE_LIBBACKTRACE=0 \ + QUICK_AND_DIRTY_COMPILER=1 \ deps make \ -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc \ @@ -60,6 +61,7 @@ else LOG_LEVEL="TRACE" \ NIMFLAGS="-d:disableMarchNative -d:chronicles_sinks=textlines -d:chronicles_colors=none" \ PARTIAL_STATIC_LINKING=1 \ + QUICK_AND_DIRTY_COMPILER=1 \ ${BINARIES} fi