mirror of https://github.com/waku-org/nwaku.git
chore(makefile): unify where chronicles_log_level is set (#1748)
This commit is contained in:
parent
36266b43cf
commit
39902dc2f2
|
@ -76,7 +76,7 @@ jobs:
|
|||
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
|
||||
|
||||
- name: Build binaries
|
||||
run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 v2
|
||||
run: make V=1 QUICK_AND_DIRTY_COMPILER=1 v2
|
||||
|
||||
test-v2:
|
||||
needs: changes
|
||||
|
|
|
@ -85,7 +85,7 @@ jobs:
|
|||
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
|
||||
|
||||
- name: Build binaries
|
||||
run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 v2 tools
|
||||
run: make V=1 QUICK_AND_DIRTY_COMPILER=1 v2 tools
|
||||
|
||||
test-v2:
|
||||
needs: changes
|
||||
|
@ -146,7 +146,7 @@ jobs:
|
|||
key: ${{ runner.os }}-vendor-modules-${{ steps.submodules.outputs.hash }}
|
||||
|
||||
- name: Build binaries
|
||||
run: make V=1 LOG_LEVEL=DEBUG QUICK_AND_DIRTY_COMPILER=1 v1
|
||||
run: make V=1 QUICK_AND_DIRTY_COMPILER=1 v1
|
||||
|
||||
test-legacy:
|
||||
needs: changes
|
||||
|
|
|
@ -6,6 +6,7 @@ ARG NIMFLAGS
|
|||
ARG MAKE_TARGET=wakunode2
|
||||
ARG EXPERIMENTAL=false
|
||||
ARG NIM_COMMIT
|
||||
ARG LOG_LEVEL=TRACE
|
||||
|
||||
# Get build tools and required header files
|
||||
RUN apk add --no-cache bash git cargo build-base pcre-dev linux-headers
|
||||
|
@ -17,10 +18,10 @@ COPY . .
|
|||
RUN git submodule update --init --recursive
|
||||
|
||||
# Slowest build step for the sake of caching layers
|
||||
RUN make -j$(nproc) deps ${NIM_COMMIT}
|
||||
RUN make -j$(nproc) deps QUICK_AND_DIRTY_COMPILER=1 ${NIM_COMMIT}
|
||||
|
||||
# Build the final node binary
|
||||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET NIMFLAGS="${NIMFLAGS}" EXPERIMENTAL="${EXPERIMENTAL}"
|
||||
RUN make -j$(nproc) ${NIM_COMMIT} $MAKE_TARGET LOG_LEVEL=${LOG_LEVEL} NIMFLAGS="${NIMFLAGS}" EXPERIMENTAL="${EXPERIMENTAL}"
|
||||
|
||||
|
||||
# PRODUCTION IMAGE -------------------------------------------------------------
|
||||
|
|
2
Makefile
2
Makefile
|
@ -7,6 +7,7 @@
|
|||
BUILD_SYSTEM_DIR := vendor/nimbus-build-system
|
||||
EXCLUDED_NIM_PACKAGES := vendor/nim-dnsdisc/vendor
|
||||
LINK_PCRE := 0
|
||||
LOG_LEVEL := TRACE
|
||||
|
||||
# we don't want an error here, so we can handle things later, in the ".DEFAULT" target
|
||||
-include $(BUILD_SYSTEM_DIR)/makefiles/variables.mk
|
||||
|
@ -272,6 +273,7 @@ docker-image:
|
|||
--build-arg="NIMFLAGS=$(DOCKER_IMAGE_NIMFLAGS)" \
|
||||
--build-arg="EXPERIMENTAL=$(EXPERIMENTAL)" \
|
||||
--build-arg="NIM_COMMIT=$(DOCKER_NIM_COMMIT)" \
|
||||
--build-arg="LOG_LEVEL=$(LOG_LEVEL)" \
|
||||
--label="commit=$(GIT_VERSION)" \
|
||||
--target $(TARGET) \
|
||||
--tag $(DOCKER_IMAGE_NAME) .
|
||||
|
|
|
@ -36,6 +36,10 @@ pipeline {
|
|||
'-d:insecure',
|
||||
].join(' ')
|
||||
)
|
||||
string(
|
||||
name: "LOG_LEVEL",
|
||||
description: "Chronicles log level (default: TRACE)",
|
||||
)
|
||||
booleanParam(
|
||||
name: 'EXPERIMENTAL',
|
||||
description: 'Enable experimental features.',
|
||||
|
@ -57,6 +61,7 @@ pipeline {
|
|||
"--build-arg=MAKE_TARGET='${params.MAKE_TARGET}' " +
|
||||
"--build-arg=NIMFLAGS='${params.NIMFLAGS}' " +
|
||||
"--build-arg=EXPERIMENTAL='${params.EXPERIMENTAL}' " +
|
||||
(params.LOG_LEVEL != null ? "--build-arg=LOG_LEVEL='${params.LOG_LEVEL}' ": "") +
|
||||
"--target=${params.DEBUG ? "debug" : "prod"} ."
|
||||
)
|
||||
} }
|
||||
|
|
12
waku.nimble
12
waku.nimble
|
@ -60,19 +60,19 @@ task testcommon, "Build & run common tests":
|
|||
### Waku v2 tasks
|
||||
task wakunode2, "Build Waku v2 cli node":
|
||||
let name = "wakunode2"
|
||||
buildBinary name, "apps/wakunode2/", "-d:chronicles_log_level=TRACE"
|
||||
buildBinary name, "apps/wakunode2/"
|
||||
|
||||
task bridge, "Build Waku v1 - v2 bridge":
|
||||
let name = "wakubridge"
|
||||
buildBinary name, "apps/wakubridge/", "-d:chronicles_log_level=TRACE"
|
||||
buildBinary name, "apps/wakubridge/"
|
||||
|
||||
task wakucanary, "Build waku-canary tool":
|
||||
let name = "wakucanary"
|
||||
buildBinary name, "apps/wakucanary/", "-d:chronicles_log_level=TRACE"
|
||||
buildBinary name, "apps/wakucanary/"
|
||||
|
||||
task networkmonitor, "Build network monitor tool":
|
||||
let name = "networkmonitor"
|
||||
buildBinary name, "apps/networkmonitor/", "-d:chronicles_log_level=TRACE"
|
||||
buildBinary name, "apps/networkmonitor/"
|
||||
|
||||
task test2, "Build & run Waku v2 tests":
|
||||
test "all_tests_v2"
|
||||
|
@ -93,11 +93,11 @@ task chat2, "Build example Waku v2 chat usage":
|
|||
#buildBinary name, "examples/v2/", "-d:chronicles_log_level=WARN"
|
||||
|
||||
let name = "chat2"
|
||||
buildBinary name, "apps/chat2/", "-d:chronicles_log_level=TRACE -d:chronicles_sinks=textlines[file] -d:ssl"
|
||||
buildBinary name, "apps/chat2/", "-d:chronicles_sinks=textlines[file] -d:ssl"
|
||||
|
||||
task chat2bridge, "Build chat2bridge":
|
||||
let name = "chat2bridge"
|
||||
buildBinary name, "apps/chat2bridge/", "-d:chronicles_log_level=TRACE"
|
||||
buildBinary name, "apps/chat2bridge/"
|
||||
|
||||
### C Bindings
|
||||
task libwakuStatic, "Build the cbindings waku node library":
|
||||
|
|
Loading…
Reference in New Issue