From 63bbe26e9556bf590bb2b574f4f36ec6c71e4a9f Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Mon, 22 Apr 2024 13:26:18 +0100 Subject: [PATCH] cmake: Add CI-specific presets --- .github/workflows/cmake.yml | 4 ++-- CMakePresets.json | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2e9d67be5c222..b425fc4ea1e64 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -227,7 +227,7 @@ jobs: - name: Generate build system run: | - cmake -B build -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DBoost_INCLUDE_DIR="${PWD}/${{ matrix.conf.boost_archive }}" -DENABLE_WALLET=ON -DWITH_EXTERNAL_SIGNER=ON -DWITH_MINIUPNPC=ON -DWITH_NATPMP=ON -DWITH_ZMQ=ON -DWITH_USDT=ON -DWERROR=ON + cmake -B build --preset ci-linux -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DBoost_INCLUDE_DIR="${PWD}/${{ matrix.conf.boost_archive }}" - name: Build working-directory: build @@ -576,7 +576,7 @@ jobs: - name: Generate build system run: | - ${{ matrix.xcode.configure_env }} cmake -B build -DWERROR=ON + ${{ matrix.xcode.configure_env }} cmake -B build --preset ci-darwin - name: Build env: diff --git a/CMakePresets.json b/CMakePresets.json index b5bcd3238f6c5..6078f81b02bb4 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -2,6 +2,48 @@ "version": 3, "cmakeMinimumRequired": {"major": 3, "minor": 21, "patch": 0}, "configurePresets": [ + { + "name": "ci-common", + "hidden": true, + "cacheVariables": { + "ENABLE_WALLET": "ON", + "WITH_SQLITE": "ON", + "WITH_BDB": "ON", + "WITH_NATPMP": "ON", + "WITH_MINIUPNPC": "ON", + "WITH_ZMQ": "ON", + "WERROR": "ON", + "CCACHE": "ON" + } + }, + { + "name": "ci-linux", + "inherits": "ci-common", + "displayName": "Build for CI tests on Linux", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, + "cacheVariables": { + "WITH_EXTERNAL_SIGNER": "ON", + "WITH_USDT": "ON" + } + }, + { + "name": "ci-darwin", + "inherits": "ci-common", + "displayName": "Build for CI tests on macOS", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Darwin" + }, + "cacheVariables": { + "WITH_GUI": "Qt5", + "WITH_EXTERNAL_SIGNER": "ON" + } + }, { "name": "vs2022", "displayName": "Build using 'Visual Studio 17 2022' generator and 'x64-windows' triplet",