Jenkins: get rid of macOS warnings (#3412)

* Jenkins: get rid of macOS warnings

We're linking object files with debug info with ones without it. Perfectly justified, from our point of view, but dsymutil complains verbosely about it, with no switch to silence it.
This commit is contained in:
Ștefan Talpalaru 2022-02-18 15:30:43 +01:00 committed by GitHub
parent 8df4290dde
commit 555ce310cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 10 deletions

8
Jenkinsfile vendored
View File

@ -21,14 +21,15 @@ def runStages(nodeDir) {
}
cache(maxCacheSize: 250, caches: [
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/${nodeDir}/vendor/nimbus-build-system/vendor/Nim/bin"],
[$class: "ArbitraryFileCache", excludes: "", includes: "**/*", path: "${WORKSPACE}/${nodeDir}/jsonTestsCache"]
]) {
stage("Build") {
stage("Preparations") {
sh """#!/bin/bash
set -e
# macOS shows scary warnings if there are old libraries and object files laying around
make clean
# to allow the following parallel stages
make -j${env.NPROC} QUICK_AND_DIRTY_COMPILER=1 deps
make -j${env.NPROC} QUICK_AND_DIRTY_COMPILER=1 update
./scripts/setup_scenarios.sh jsonTestsCache
"""
}
@ -37,7 +38,6 @@ def runStages(nodeDir) {
stage("Tools") {
sh """#!/bin/bash
set -e
make -j${env.NPROC}
make -j${env.NPROC} LOG_LEVEL=TRACE
"""
}

View File

@ -31,9 +31,17 @@ CPU_LIMIT := 0
BUILD_END_MSG := "\\x1B[92mBuild completed successfully:\\x1B[39m"
ifeq ($(CPU_LIMIT), 0)
CPU_LIMIT_CMD :=
CPU_LIMIT_CMD :=
else
CPU_LIMIT_CMD := cpulimit --limit=$(CPU_LIMIT) --foreground --
CPU_LIMIT_CMD := cpulimit --limit=$(CPU_LIMIT) --foreground --
endif
# TODO: move this to nimbus-build-system
ifeq ($(shell uname), Darwin)
# Scary warnings in large volume: https://github.com/status-im/nimbus-eth2/issues/3076
SILENCE_WARNINGS := 2>&1 | grep -v "failed to insert symbol" | grep -v "could not find object file symbol for symbol" || true
else
SILENCE_WARNINGS :=
endif
# unconditionally built by the default Make target
@ -241,7 +249,7 @@ build/generate_makefile: | libbacktrace
endif
build/generate_makefile: tools/generate_makefile.nim | deps-common
+ echo -e $(BUILD_MSG) "$@" && \
$(ENV_SCRIPT) nim c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim && \
$(ENV_SCRIPT) nim c -o:$@ $(NIM_PARAMS) tools/generate_makefile.nim $(SILENCE_WARNINGS) && \
echo -e $(BUILD_END_MSG) "$@"
# GCC's LTO parallelisation is able to detect a GNU Make jobserver and get its
@ -458,7 +466,7 @@ endif
libnfuzz.so: | build deps
+ echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
$(ENV_SCRIPT) nim c -d:release --app:lib --noMain --nimcache:nimcache/libnfuzz -o:build/$@.0 $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \
echo -e $(BUILD_END_MSG) "build/$@" && \
rm -f build/$@ && \
ln -s $@.0 build/$@
@ -466,7 +474,7 @@ libnfuzz.so: | build deps
libnfuzz.a: | build deps
+ echo -e $(BUILD_MSG) "build/$@" && \
rm -f build/$@ && \
$(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim && \
$(ENV_SCRIPT) nim c -d:release --app:staticlib --noMain --nimcache:nimcache/libnfuzz_static -o:build/$@ $(NIM_PARAMS) nfuzz/libnfuzz.nim $(SILENCE_WARNINGS) && \
echo -e $(BUILD_END_MSG) "build/$@" && \
[[ -e "$@" ]] && mv "$@" build/ || true # workaround for https://github.com/nim-lang/Nim/issues/12745

View File

@ -29,5 +29,9 @@ build/generate_makefile "nimcache/release/${BINARY}/${PROJECT_NAME}.json" "nimca
if uname | grep -qi darwin || [[ -n "${FORCE_DSYMUTIL}" ]]; then
[[ -z "${DSYMUTIL}" ]] && DSYMUTIL="dsymutil"
"${DSYMUTIL}" build/${BINARY}
# Scary warnings in large volume: https://github.com/status-im/nimbus-eth2/issues/3076
"${DSYMUTIL}" build/${BINARY} 2>&1 \
| grep -v "failed to insert symbol" \
| grep -v "could not find object file symbol for symbol" \
|| true
fi