From 9f0c94533604f4a580c94ebea4d6edcab274f59a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Sun, 17 Mar 2019 01:54:30 +0100 Subject: [PATCH] CI: use a release build for the test suite (#278) * CI: use a release build for the test suite Makefile: the "testsuite" target is no longer needed * rename EXTRA_NIM_PARAMS to NIMFLAGS --- .appveyor.yml | 2 +- .travis.yml | 3 ++- Makefile | 13 +++++-------- README.md | 2 +- tests/all_tests.nim | 3 ++- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a780a6c88..09fba1b92 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -28,7 +28,7 @@ build_script: test_script: - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% V=0 - build\nimbus.exe --help - - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% V=0 test + - mingw32-make -j2 ARCH_OVERRIDE=%PLATFORM% V=0 NIMFLAGS="-d:release" test - IF "%PLATFORM%" == "x64" mingw32-make -j2 test-reproducibility deploy: off diff --git a/.travis.yml b/.travis.yml index 8253a6767..e1d8f345b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,5 +35,6 @@ script: - set -e # fail fast - make -j${NPROC} V=0 - ./build/nimbus --help - - make -j${NPROC} V=0 test test-reproducibility + - make -j${NPROC} V=0 NIMFLAGS="-d:release" test + - make -j${NPROC} V=0 test-reproducibility diff --git a/Makefile b/Makefile index 729331579..f38977a81 100644 --- a/Makefile +++ b/Makefile @@ -25,8 +25,9 @@ RUN_CMD_IN_ALL_REPOS = git submodule foreach --recursive --quiet 'echo -e "\n\e[ ENV_SCRIPT := "$(CURDIR)/env.sh" # duplicated in "env.sh" to prepend NIM_DIR/bin to PATH NIM_DIR := vendor/Nim -# extra parameters for the Nim compiler -NIM_PARAMS := $(EXTRA_NIM_PARAMS) +#- extra parameters for the Nim compiler +#- NIMFLAGS should come from the environment or make's command line +NIM_PARAMS := $(NIMFLAGS) # verbosity level V := 1 NIM_PARAMS := $(NIM_PARAMS) --verbosity:$(V) @@ -139,14 +140,10 @@ $(NIMBLE_DIR): | $(NIM_BINARY) nimbus.nims: ln -s nimbus.nimble $@ -# builds and runs the testsuite -testsuite: | build deps +# builds and runs the test suite +test: | build deps $(ENV_SCRIPT) nim test $(NIM_PARAMS) nimbus.nims -#- builds the tools, to make sure they're still compilable -#- builds and runs all tests -test: | testsuite - # primitive reproducibility test test-reproducibility: + [ -e build/nimbus ] || $(MAKE) V=0 nimbus; \ diff --git a/README.md b/README.md index f4142a176..296b2b687 100644 --- a/README.md +++ b/README.md @@ -138,7 +138,7 @@ make LOG_LEVEL=TRACE nimbus # log everything - pass arbitrary parameters to the Nim compiler: ```bash -make EXTRA_NIM_PARAMS="-d:release" +make NIMFLAGS="-d:release" ``` - if you want to use SSH keys with GitHub: diff --git a/tests/all_tests.nim b/tests/all_tests.nim index 9f5aca15a..80e63fd41 100644 --- a/tests/all_tests.nim +++ b/tests/all_tests.nim @@ -22,4 +22,5 @@ import ./test_code_stream, ./test_op_env, ./test_op_memory, ./test_op_misc, - ./test_state_db \ No newline at end of file + ./test_state_db +