From ea720990fcaf3384157b2f3ecae6bdbea259ea67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 28 Aug 2026 14:45:00 +0200 Subject: [PATCH] ci: Build without testing in the min-compiler jobs EVMONE_TESTING defaults to OFF and is the only configuration where GTest is never fetched, but every job passed it ON, so nothing noticed if the code built under EVMONE_TOOLS grew a dependency on GTest. That matters now that evmone::testutils carries the fixture runners. gcc-min and clang-min build the default configuration first, run the tool once to check it works at all, then reconfigure with testing on. The second pass reuses every object of the first, so this costs a configure, not a build. --- circle.yml | 69 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 56 insertions(+), 13 deletions(-) diff --git a/circle.yml b/circle.yml index ca71383d3e..32a63e5e86 100644 --- a/circle.yml +++ b/circle.yml @@ -185,8 +185,49 @@ commands: LLVM_PROFILE_FILE=blockchain_tests.profraw bin/evmone-blockchaintest --gtest_filter='<>' ~/spec-tests/fixtures/blockchain_tests + configure: + description: "Configure" + parameters: + testing: + description: "Build the tests and the test tools" + type: boolean + default: true + steps: + - run: + name: "Configure (testing << parameters.testing >>)" + working_directory: ~/build + command: | + if [ "$TOOLCHAIN" ]; then + export toolchain_option="-DTOOLCHAIN=$TOOLCHAIN" + fi + cmake ../project $toolchain_option -DCMAKE_INSTALL_PREFIX=~/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_COMPILE_WARNING_AS_ERROR=TRUE -DEVMONE_TESTING=<< parameters.testing >> $CMAKE_OPTIONS + + compile: + description: "Compile" + steps: + - run: + name: "Build" + command: cmake --build ~/build + + smoke_test: + description: "Run the tool once to check the build works" + steps: + - run: + name: "Smoke test the tool" + working_directory: ~/build + command: | + bin/evmone --version + bin/evmone run 600160005260206000f3 | tee out.txt + grep -q "Result: *success" out.txt + grep -q "Output: *0\{63\}1" out.txt + build: description: "Build" + parameters: + tools_only_first: + description: "Build with testing off first and smoke-test the tool, then reconfigure" + type: boolean + default: false steps: - checkout - checkout_submodules @@ -212,22 +253,22 @@ commands: - restore_cache: name: "Restore Hunter cache" key: &hunter-cache-key hunter-{{arch}}-{{checksum "build.info"}}-{{checksum "cmake/Hunter/init.cmake"}}-{{checksum "cmake/Hunter/config.cmake"}} - - run: - name: "Configure" - working_directory: ~/build - command: | - if [ "$TOOLCHAIN" ]; then - export toolchain_option="-DTOOLCHAIN=$TOOLCHAIN" - fi - cmake ../project $toolchain_option -DCMAKE_INSTALL_PREFIX=~/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_COMPILE_WARNING_AS_ERROR=TRUE -DEVMONE_TESTING=ON $CMAKE_OPTIONS + # Testing off is the only configuration that never fetches GTest. It goes first because the + # Hunter cache is saved after the configure below, which is the one that has GTest in it. + - when: + condition: << parameters.tools_only_first >> + steps: + - configure: + testing: false + - compile + - smoke_test + - configure - save_cache: name: "Save Hunter cache" key: *hunter-cache-key paths: - ~/.hunter/_Base/Cache - - run: - name: "Build" - command: cmake --build ~/build + - compile - run: name: "Install" command: cmake --build ~/build --target install @@ -523,7 +564,8 @@ jobs: gcc-min: executor: linux-gcc-min steps: - - build + - build: + tools_only_first: true - test clang-min: @@ -531,7 +573,8 @@ jobs: environment: CMAKE_OPTIONS=-DEVMONE_X86_64_ARCH_LEVEL=3 steps: - - build + - build: + tools_only_first: true - test gcc-latest-memcheck: