Skip to content

Commit ee3f466

Browse files
stefantalpalaruzah
authored andcommitted
CI, dist: faster Nim compiler builds
1 parent 786137f commit ee3f466

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,6 @@ jobs:
215215
getHash() {
216216
git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1
217217
}
218-
# nimHash=$(getHash nim-lang/Nim '${{ matrix.branch }}')
219-
# csourcesHash=$(getHash nim-lang/csources)
220-
# echo "::set-output name=nim::$nimHash"
221-
# echo "::set-output name=csources::$csourcesHash"
222218
nbsHash=$(getHash status-im/nimbus-build-system)
223219
echo "::set-output name=nimbus_build_system::$nbsHash"
224220
@@ -229,11 +225,11 @@ jobs:
229225
path: nim-beacon-chain/NimBinaries
230226
key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nimbus_build_system }}'
231227

232-
- name: Build Nim and NBC dependencies
228+
- name: Build Nim and Nimbus dependencies
233229
shell: bash
234230
working-directory: nim-beacon-chain
235231
run: |
236-
make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries V=1 update
232+
make -j$ncpu ARCH_OVERRIDE=$PLATFORM CI_CACHE=NimBinaries QUICK_AND_DIRTY_COMPILER=1 update
237233
238234
- name: Get latest fixtures commit hash
239235
if: matrix.target.TEST_KIND == 'unit-tests'

Jenkinsfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ def runStages() {
2525
stage("Build") {
2626
sh """#!/bin/bash
2727
set -e
28-
make -j${env.NPROC} V=1 update # to allow a newer Nim version to be detected
29-
make -j${env.NPROC} V=1 deps # to allow the following parallel stages
30-
V=1 ./scripts/setup_official_tests.sh jsonTestsCache
28+
# to allow the following parallel stages
29+
make -j${env.NPROC} QUICK_AND_DIRTY_COMPILER=1 deps
30+
./scripts/setup_official_tests.sh jsonTestsCache
3131
"""
3232
}
3333
}
@@ -38,16 +38,16 @@ def runStages() {
3838
stage("Tools") {
3939
sh """#!/bin/bash
4040
set -e
41-
make -j${env.NPROC} V=1
42-
make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node
41+
make -j${env.NPROC}
42+
make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:testnet_servers_image' nimbus_beacon_node
4343
# Miracl fallback
44-
# make -j${env.NPROC} V=1 LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node
44+
# make -j${env.NPROC} LOG_LEVEL=TRACE NIMFLAGS='-d:BLS_FORCE_BACKEND=miracl -d:testnet_servers_image' nimbus_beacon_node
4545
"""
4646
}
4747
},
4848
"test suite": {
4949
stage("Test suite") {
50-
sh "make -j${env.NPROC} V=1 DISABLE_TEST_FIXTURES_SCRIPT=1 test"
50+
sh "make -j${env.NPROC} DISABLE_TEST_FIXTURES_SCRIPT=1 test"
5151
}
5252
stage("testnet finalization") {
5353
// EXECUTOR_NUMBER will be 0 or 1, since we have 2 executors per Jenkins node

docker/dist/entry_point.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ if [[ "${PLATFORM}" == "Windows_amd64" ]]; then
2828
make \
2929
-j$(nproc) \
3030
USE_LIBBACKTRACE=0 \
31+
QUICK_AND_DIRTY_COMPILER=1 \
3132
deps
3233
make \
3334
-C vendor/nim-nat-traversal/vendor/miniupnp/miniupnpc \
@@ -60,6 +61,7 @@ else
6061
LOG_LEVEL="TRACE" \
6162
NIMFLAGS="-d:disableMarchNative -d:chronicles_sinks=textlines -d:chronicles_colors=none" \
6263
PARTIAL_STATIC_LINKING=1 \
64+
QUICK_AND_DIRTY_COMPILER=1 \
6365
${BINARIES}
6466
fi
6567

0 commit comments

Comments
 (0)