From bccf8c024bee5f233a694359cc9534131147941f Mon Sep 17 00:00:00 2001 From: snider Date: Tue, 7 Oct 2025 01:07:35 +0100 Subject: [PATCH 1/2] Add caching and dependency installation steps for ARM, Intel, and macOS builds --- .github/workflows/build-linux-arm64.yml | 56 ++++++++++++++---- .github/workflows/build-linux-intel.yml | 56 ++++++++++++++---- .github/workflows/build-macos-arm64.yml | 59 +++++++++++++------ .github/workflows/build-macos-intel.yml | 52 +++++++++++++---- .github/workflows/build-windows-intel.yml | 53 +++++++++++++---- Makefile | 69 ++++++++++------------- 6 files changed, 246 insertions(+), 99 deletions(-) diff --git a/.github/workflows/build-linux-arm64.yml b/.github/workflows/build-linux-arm64.yml index 73fa8155..25420df2 100644 --- a/.github/workflows/build-linux-arm64.yml +++ b/.github/workflows/build-linux-arm64.yml @@ -11,8 +11,47 @@ on: type: string jobs: + cache: + name: cache-arm64 + runs-on: ubuntu-22.04-arm + steps: + - name: Cache SDK Folder + id: cache + uses: actions/cache@v4 + with: + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin + key: ${{ runner.os }}-${{ runner.arch }}-sdk + + - name: Checkout Project + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + submodules: recursive + + - name: install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get install -y autotools-dev git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant + + - uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: 3.x + + - if: steps.cache.outputs.cache-hit != 'true' + run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" + + - name: Compile Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + make upload-conan-cache + build: - name: gcc-linux-arm64 + name: compile-arm64 + needs: cache runs-on: ubuntu-22.04-arm steps: - name: Checkout Project @@ -27,7 +66,9 @@ jobs: - name: Cache SDK Folder uses: actions/cache@v4 with: - path: ${{ github.workspace }}/build/sdk + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin key: ${{ runner.os }}-${{ runner.arch }}-sdk - uses: actions/setup-python@v5 @@ -36,15 +77,8 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - - - name: Install Conan - uses: conan-io/setup-conan@v1 - with: - home: ${{ github.workspace }}/build/sdk - cache_packages: false - - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts @@ -52,4 +86,4 @@ jobs: chain-network: ${{ inputs.chain-network }} assets: lethean-* asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/release/packages + asset-directory: ${{ github.workspace }}/build/packages diff --git a/.github/workflows/build-linux-intel.yml b/.github/workflows/build-linux-intel.yml index bb30c892..8385b594 100644 --- a/.github/workflows/build-linux-intel.yml +++ b/.github/workflows/build-linux-intel.yml @@ -11,8 +11,48 @@ on: type: string jobs: + cache: + name: cache-x86_64 + runs-on: ubuntu-22.04 + steps: + - name: Cache SDK Folder + id: cache + uses: actions/cache@v4 + with: + lookup-only: true + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin + key: ${{ runner.os }}-${{ runner.arch }}-sdk + + - name: Checkout Project + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + submodules: recursive + + - name: install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: sudo apt-get install -y autotools-dev git build-essential + + - uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: 3.x + - if: steps.cache.outputs.cache-hit != 'true' + run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" + + - name: Compile Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + make upload-conan-cache + + build: - name: gcc-linux-x86_64 + name: compile-x86_64 + needs: cache runs-on: ubuntu-22.04 steps: - name: Checkout Project @@ -27,7 +67,9 @@ jobs: - name: Cache SDK Folder uses: actions/cache@v4 with: - path: ${{ github.workspace }}/build/sdk + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin key: ${{ runner.os }}-${{ runner.arch }}-sdk - uses: actions/setup-python@v5 @@ -35,14 +77,8 @@ jobs: python-version: 3.x - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - - name: Install Conan - uses: conan-io/setup-conan@v1 - with: - home: ${{ github.workspace }}/build/sdk - cache_packages: false - - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts @@ -50,4 +86,4 @@ jobs: chain-network: ${{ inputs.chain-network }} assets: lethean-* asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/release/packages + asset-directory: ${{ github.workspace }}/build/packages diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml index 24c3249d..4b93a4a1 100644 --- a/.github/workflows/build-macos-arm64.yml +++ b/.github/workflows/build-macos-arm64.yml @@ -12,8 +12,44 @@ on: jobs: - build-cli: - name: apple-clang-armv8 + cache: + name: cache-armv8 + runs-on: macos-15 + steps: + - name: Cache SDK Folder + id: cache + uses: actions/cache@v4 + with: + lookup-only: true + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin + key: ${{ runner.os }}-${{ runner.arch }}-sdk + + - name: Checkout Project + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + submodules: recursive + + - uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: 3.x + + - if: steps.cache.outputs.cache-hit != 'true' + run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" + + - name: Compile Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + make build-deps CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + make upload-conan-cache + + build: + name: compile-armv8 + needs: cache runs-on: macos-15 steps: - name: Checkout Project @@ -22,11 +58,12 @@ jobs: fetch-depth: 0 submodules: recursive - - name: Cache SDK Folder uses: actions/cache@v4 with: - path: ${{ github.workspace }}/build/sdk + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin key: ${{ runner.os }}-${{ runner.arch }}-sdk - uses: actions/setup-python@v5 @@ -35,18 +72,8 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - - name: Install Conan - uses: conan-io/setup-conan@v1 - with: - home: ${{ github.workspace }}/build/sdk - cache_packages: false - -# - name: Compile Release -# run: make apple-clang-armv8 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - name: Compile Release - run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - + run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts @@ -54,4 +81,4 @@ jobs: chain-network: ${{ inputs.chain-network }} assets: lethean-* asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/release/packages + asset-directory: ${{ github.workspace }}/build/packages diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index 15b50386..39f73ebb 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -11,8 +11,43 @@ on: type: string jobs: + cache: + name: cache-x86_64 + runs-on: macos-13 + steps: + - name: Cache SDK Folder + id: cache + uses: actions/cache@v4 + with: + lookup-only: true + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin + key: ${{ runner.os }}-${{ runner.arch }}-sdk + + - name: Checkout Project + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + submodules: recursive + + - uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: 3.x + - if: steps.cache.outputs.cache-hit != 'true' + run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" + + - name: Compile Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + make upload-conan-cache + build: - name: apple-clang-x86_64 + name: compile-x86_64 + needs: cache runs-on: macos-13 steps: - name: Checkout Project @@ -21,11 +56,12 @@ jobs: fetch-depth: 0 submodules: recursive - - name: Cache SDK Folder uses: actions/cache@v4 with: - path: ${{ github.workspace }}/build/sdk + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin key: ${{ runner.os }}-${{ runner.arch }}-sdk - uses: actions/setup-python@v5 @@ -33,14 +69,8 @@ jobs: python-version: 3.x - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - - name: Install Conan - uses: conan-io/setup-conan@v1 - with: - home: ${{ github.workspace }}/build/sdk - cache_packages: false - - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts @@ -48,4 +78,4 @@ jobs: chain-network: ${{ inputs.chain-network }} assets: lethean-* asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/release/packages + asset-directory: ${{ github.workspace }}/build/packages diff --git a/.github/workflows/build-windows-intel.yml b/.github/workflows/build-windows-intel.yml index 1d59e014..2edfae90 100644 --- a/.github/workflows/build-windows-intel.yml +++ b/.github/workflows/build-windows-intel.yml @@ -11,8 +11,43 @@ on: type: string jobs: - msvc-194: - name: msvc-194-x86_64 + cache: + name: cache-x86_64 + runs-on: windows-latest + steps: + - name: Cache SDK Folder + id: cache + uses: actions/cache@v4 + with: + lookup-only: true + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin + key: ${{ runner.os }}-${{ runner.arch }}-sdk + + - name: Checkout Project + if: steps.cache.outputs.cache-hit != 'true' + uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + submodules: recursive + + - uses: actions/setup-python@v5 + if: steps.cache.outputs.cache-hit != 'true' + with: + python-version: 3.x + - if: steps.cache.outputs.cache-hit != 'true' + run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" + + - name: Compile Dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: | + make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + make upload-conan-cache + + build: + name: compile-x86_64 + needs: cache runs-on: windows-latest steps: - name: Checkout Project @@ -24,7 +59,9 @@ jobs: - name: Cache SDK Folder uses: actions/cache@v4 with: - path: ${{ github.workspace }}/build/sdk + path: | + ${{ github.workspace }}/build/sdk + ${{ github.workspace }}/build/bin key: ${{ runner.os }}-${{ runner.arch }}-sdk - uses: actions/setup-python@v5 @@ -32,14 +69,8 @@ jobs: python-version: 3.x - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - - name: Install Conan - uses: conan-io/setup-conan@v1 - with: - home: ${{ github.workspace }}/build/sdk - cache_packages: false - - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts @@ -47,4 +78,4 @@ jobs: chain-network: ${{ inputs.chain-network }} assets: lethean-* asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/release/packages + asset-directory: ${{ github.workspace }}/build/packages diff --git a/Makefile b/Makefile index e0b51891..5c33ed84 100644 --- a/Makefile +++ b/Makefile @@ -52,76 +52,67 @@ ifeq ($(OS),Windows_NT) endif endif -#testnet-genesis-new: -# $(eval command += $(cmake_release) $(testnet)) -# $(call CMAKE,$(dir_release),$(command) -DGENERATE_PREMINE_WALLET=1 -DPREMINE_WALLET_PASSWORD=12345678) && cmake --build ./src --target premine_wallet || true -# $(eval command += $(cmake_release) $(testnet)) -# $(call CMAKE,$(dir_release),$(command) -DGENERATE_FRESH_GENESIS=1) && cmake --build ./src --target genesis_generator -# $(eval command += $(cmake_release) $(testnet)) -# $(call CMAKE,$(dir_release),$(command)) && $(MAKE) -# -#genesis-new: -# $(eval command += $(cmake_release)) -# $(call CMAKE,$(dir_release),$(command) -DGENERATE_FRESH_GENESIS=1) && cmake --build ./src --target genesis_generator -# $(eval command += $(cmake_release)) -# $(call CMAKE,$(dir_release),$(command)) && $(MAKE) - # ----------------------------------------------------------------- # Safety net – ensure we always have a positive integer. # ----------------------------------------------------------------- CPU_CORES := $(or $(CPU_CORES),1) CPU_CORES := $(shell expr $(CPU_CORES) + 0 2>/dev/null || echo 1) -#CONAN_CPU_COUNT=$(CPU_CORES) +CONAN_CPU_COUNT=$(CPU_CORES) PROFILES := $(patsubst cmake/profiles/%,%,$(wildcard cmake/profiles/*)) SORTED_PROFILES := $(sort $(PROFILES)) CONAN_CACHE := $(CURDIR)/build/sdk +CONAN_URL:=https://artifacts.host.uk.com/artifactory/api/conan/conan-build +CONAN_USER:=public +CONAN_PASSWORD:=Lethean1234 DEFAULT_CONAN_PROFILE := $(CONAN_CACHE)/profiles/default +CONAN_EXECUTABLE := $(CURDIR)/build/bin/conan CC_DOCKER_FILE?=utils/docker/images/lthn-chain/Dockerfile -# Detect if we are on Windows -ifeq ($(OS), Windows_NT) - # If so, define a prefix to clear the problematic env vars - FIX_ENV := CFLAGS="" CXXFLAGS="" -else - # Otherwise, the prefix is empty - FIX_ENV := -endif + all: help release: docs build (cd $(BUILD_FOLDER) && cpack) + @rm -rf $(CURDIR)/build/packages/_CPack_Packages build: configure cmake --build $(BUILD_FOLDER) --config=$(BUILD_TYPE) --parallel=$(CPU_CORES) debug: conan-profile-detect @echo "Building profile: debug" - $(FIX_ENV) CONAN_HOME=$(CONAN_CACHE) conan install . --output-folder=build/debug --build=missing -s build_type=Debug + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . --output-folder=build/debug --build=missing -s build_type=Debug cmake -S . -B build/debug -DCMAKE_TOOLCHAIN_FILE=build/debug/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -DTESTNET=$(TESTNET) cmake --build build/debug --config=Debug --parallel=$(CPU_CORES) build-deps: conan-profile-detect @echo "Build Dependencies: $(BUILD_TYPE) testnet=$(TESTNET)" - $(FIX_ENV) CONAN_HOME=$(CONAN_CACHE) conan install . --build=missing -s build_type=$(BUILD_TYPE) + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . --build=missing -s build_type=$(BUILD_TYPE) configure: build-deps @echo "Running Configure: $(BUILD_TYPE) testnet=$(TESTNET)" cmake -S . -B $(BUILD_FOLDER) -DCMAKE_TOOLCHAIN_FILE=$(BUILD_FOLDER)/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DSTATIC=$(STATIC) -DTESTNET=$(TESTNET) -DBUILD_VERSION=$(BUILD_VERSION) +docs: configure + @echo "Building Documentation" + cmake --build build/release --target=docs --config=Release --parallel=$(CPU_CORES) -conan-profile-detect: - @if [ ! -f "$(DEFAULT_CONAN_PROFILE)" ]; then \ - echo "Default conan profile not found. Detecting a new one..."; \ - CONAN_HOME=$(CONAN_CACHE) conan profile detect --name=default --force; \ - fi +get-conan: + cmake -P cmake/GetConan.cmake + (CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) remote add conan_build $(CONAN_URL) && \ + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) remote login conan_build $(CONAN_USER) -p $(CONAN_PASSWORD)) || true +upload-conan-cache: + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) upload "*" -r=conan_build --confirm + +conan-profile-detect: get-conan + cmake -P cmake/ConanProfileSetup.cmake # Rule for each profile $(PROFILES): conan-profile-detect @echo "Building profile: $@" - CFLAGS="" CXXFLAGS="" CONAN_HOME=$(CONAN_CACHE) conan install . -pr:h=cmake/profiles/$@ --build=missing -s build_type=$(BUILD_TYPE) + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . -pr:h=cmake/profiles/$@ --build=missing -s build_type=$(BUILD_TYPE) cmake -S . -B $(BUILD_FOLDER) -DCMAKE_TOOLCHAIN_FILE=$(BUILD_FOLDER)/generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DSTATIC=$(STATIC) -DTESTNET=$(TESTNET) -DBUILD_VERSION=$(BUILD_VERSION) cmake --build $(BUILD_FOLDER) --config=$(BUILD_TYPE) --parallel=$(CPU_CORES) (cd $(BUILD_FOLDER) && cpack) @@ -129,6 +120,7 @@ $(PROFILES): conan-profile-detect help: @echo "Available targets:" @printf " %-42s %s\n" "make clean" "Clean all build directories" + @printf " %-42s %s\n" "make get-conan" "Download and install conan locally" @printf " %-42s %s\n" "make release" "Build release" @printf " %-42s %s\n" "make static" "Build static release" @printf " %-42s %s\n" "make debug" "Build debug" @@ -147,32 +139,29 @@ help: test: test-release test-release: @echo "Building profile: test-release" - CONAN_HOME=$(CONAN_CACHE) conan install . --output-folder=build/test-release --build=missing -s build_type=$(BUILD_TYPE) + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . --output-folder=build/test-release --build=missing -s build_type=$(BUILD_TYPE) cmake -S . -B build/test-release -DCMAKE_TOOLCHAIN_FILE=build/test-release/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_TESTS=ON cmake --build build/test-release --config=Release --parallel=$(CPU_CORES) $(MAKE) test test-debug: @echo "Building profile: test-debug" - CONAN_HOME=$(CONAN_CACHE) conan install . --output-folder=build/test-debug --build=missing -s build_type=$(BUILD_TYPE) + CONAN_HOME=$(CONAN_CACHE) $(CONAN_EXECUTABLE) install . --output-folder=build/test-debug --build=missing -s build_type=$(BUILD_TYPE) cmake -S . -B build/test-debug -DCMAKE_TOOLCHAIN_FILE=build/test-debug/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Debug -D BUILD_TESTS=ON cmake --build build/test-debug --config=Debug --parallel=$(CPU_CORES) $(MAKE) test - -docs: configure - @echo "Building Documentation" - cmake --build build/release --target=docs --config=Release --parallel=$(CPU_CORES) - docs-dev: configure @echo "Building Documentation" cmake --build build/release --target=serve_docs --config=Release - clean: + @cmake -P cmake/CleanBuild.cmake + +clean-build: rm -rf build tags: ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest -.PHONY: all release docker-chain-node debug docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect $(PROFILES) +.PHONY: all release upload-conan-cache docker-chain-node debug docs docs-dev configure static static-release test test-release test-debug clean tags conan-profile-detect get-conan $(PROFILES) From 83a0623a493ffd5ba7e5335f8f8438694631f22a Mon Sep 17 00:00:00 2001 From: snider Date: Tue, 7 Oct 2025 01:46:52 +0100 Subject: [PATCH 2/2] Remove unused CONAN_USER and CONAN_PASSWORD from release build commands --- .github/workflows/build-linux-arm64.yml | 2 +- .github/workflows/build-linux-intel.yml | 2 +- .github/workflows/build-macos-arm64.yml | 2 +- .github/workflows/build-macos-intel.yml | 2 +- .github/workflows/build-windows-intel.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-linux-arm64.yml b/.github/workflows/build-linux-arm64.yml index e7130e84..9a64e529 100644 --- a/.github/workflows/build-linux-arm64.yml +++ b/.github/workflows/build-linux-arm64.yml @@ -79,7 +79,7 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/workflows/build-linux-intel.yml b/.github/workflows/build-linux-intel.yml index 21206475..edfc56bc 100644 --- a/.github/workflows/build-linux-intel.yml +++ b/.github/workflows/build-linux-intel.yml @@ -79,7 +79,7 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml index e46a0117..140a9f74 100644 --- a/.github/workflows/build-macos-arm64.yml +++ b/.github/workflows/build-macos-arm64.yml @@ -74,7 +74,7 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - name: Compile Release - run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index 39f73ebb..93dbe618 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -70,7 +70,7 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts diff --git a/.github/workflows/build-windows-intel.yml b/.github/workflows/build-windows-intel.yml index 2edfae90..5038bc65 100644 --- a/.github/workflows/build-windows-intel.yml +++ b/.github/workflows/build-windows-intel.yml @@ -70,7 +70,7 @@ jobs: - run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]" - name: Compile Release - run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }} + run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - name: CLI Artifacts uses: ./.github/actions/upload-artifacts