CI, dist: faster Nim compiler builds

This commit is contained in:
Ștefan Talpalaru 2021-02-11 20:03:29 +01:00 committed by zah
parent 786137ffb4
commit ee3f466dfe
3 changed files with 11 additions and 13 deletions

View File

@ -215,10 +215,6 @@ jobs:
getHash() { getHash() {
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1 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) nbsHash=$(getHash status-im/nimbus-build-system)
echo "::set-output name=nimbus_build_system::$nbsHash" echo "::set-output name=nimbus_build_system::$nbsHash"
@ -229,11 +225,11 @@ jobs:
path: nim-beacon-chain/NimBinaries path: nim-beacon-chain/NimBinaries
key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}' 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 shell: bash
working-directory: nim-beacon-chain working-directory: nim-beacon-chain
run: | 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 - name: Get latest fixtures commit hash
if: matrix.target.TEST_KIND == 'unit-tests' if: matrix.target.TEST_KIND == 'unit-tests'

14
Jenkinsfile vendored
View File

@ -25,9 +25,9 @@ def runStages() {
stage("Build") { stage("Build") {
sh """#!/bin/bash sh """#!/bin/bash
set -e set -e
make -j${env.NPROC} V=1 update # to allow a newer Nim version to be detected # to allow the following parallel stages
make -j${env.NPROC} V=1 deps # to allow the following parallel stages make -j${env.NPROC} QUICK_AND_DIRTY_COMPILER=1 deps
V=1 ./scripts/setup_official_tests.sh jsonTestsCache ./scripts/setup_official_tests.sh jsonTestsCache
""" """
} }
} }
@ -38,16 +38,16 @@ def runStages() {
stage("Tools") { stage("Tools") {
sh """#!/bin/bash sh """#!/bin/bash
set -e set -e
make -j${env.NPROC} V=1 make -j${env.NPROC}
make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node
# Miracl fallback # 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": { "test suite": {
stage("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") { stage("testnet finalization") {
// EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node // EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node

View File

@ -28,6 +28,7 @@ if [[ "${PLATFORM}" == "Windows_amd64" ]]; then
make \ make \
-j$(nproc) \ -j$(nproc) \
USE_LIBBACKTRACE=0 \ USE_LIBBACKTRACE=0 \
QUICK_AND_DIRTY_COMPILER=1 \
deps deps
make \ make \
-C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc \ -C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc \
@ -60,6 +61,7 @@ else
LOG_LEVEL="TRACE" \ LOG_LEVEL="TRACE" \
NIMFLAGS="-d:disableMarchNative -d:chronicles_sinks=textlines -d:chronicles_colors=none" \ NIMFLAGS="-d:disableMarchNative -d:chronicles_sinks=textlines -d:chronicles_colors=none" \
PARTIAL_STATIC_LINKING=1 \ PARTIAL_STATIC_LINKING=1 \
QUICK_AND_DIRTY_COMPILER=1 \
${BINARIES} ${BINARIES}
fi fi