From 7ea697ac0dc60c2d8e80195e210326cbe83ea3ea Mon Sep 17 00:00:00 2001 From: Snider Date: Thu, 21 Mar 2024 20:04:59 +0000 Subject: [PATCH] moves conan settings into Makefile --- .github/dependabot.yml | 6 ++++++ .github/workflows/cli-testnet.yml | 9 ++++----- Makefile | 24 +++++++++++++++--------- build/settings_user.yml | 5 +++++ 4 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 build/settings_user.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..120c6893 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" \ No newline at end of file diff --git a/.github/workflows/cli-testnet.yml b/.github/workflows/cli-testnet.yml index c94898e0..63b5b4b7 100644 --- a/.github/workflows/cli-testnet.yml +++ b/.github/workflows/cli-testnet.yml @@ -45,7 +45,7 @@ jobs: sudo apt-get install -y git ccache if: ${{ matrix.os == 'ubuntu-latest' }} - name: Setup Python - uses: actions/setup-python@v4.6.0 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install autotools on macOS @@ -54,7 +54,7 @@ jobs: - uses: actions/cache@v3 with: path: ${{ github.workspace }}/ccache - key: ccache-${{ runner.os }}-${{ matrix.os }}-build-testnet-cli + key: ccache-${{ runner.os }}-${{ matrix.target }}-build-testnet-cli - name: Using the builtin GitHub Cache Action for .conan id: github-cache-conan uses: actions/cache@v4 @@ -62,8 +62,8 @@ jobs: cache-name: cache-conan-modules with: save-always: true - path: ${{ env.CONAN_HOME }} - key: host-${{ runner.os }}-target-${{ matrix.os }}-${{ hashFiles('contrib/cmake/conanfile.py') }} + path: ${{ github.workspace }}/build/p + key: host-${{ runner.os }}-target-${{ matrix.target }}-${{ hashFiles('contrib/cmake/conanfile.py') }} - name: Install Conan run: pip install conan pytest && conan --version - name: Setup CMake and Ninja @@ -73,7 +73,6 @@ jobs: ninjaVersion: "^1.11.1" - name: Call make release-testnet run: | - conan config install contrib/cmake/settings_user.yml make ci-${{ matrix.target }}-testnet - name: Release Tag uses: softprops/action-gh-release@v1 diff --git a/Makefile b/Makefile index 64a5d6da..585e3e15 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,16 @@ endef build = build dir_debug = $(build)/debug dir_release = $(build)/release +current_dir := $(dir $(abspath $(firstword $(MAKEFILE_LIST)))) +export CONAN_HOME = $(current_dir)$(build) -all: release +all: help -release: +release: ## Build release non-static binaries $(eval command += $(cmake_release)) $(call CMAKE,$(dir_release),$(command)) && $(MAKE) -release-testnet: +release-testnet: ## Build testnet non-static binaries $(eval command += $(cmake_release) $(cmake_testnet)) $(call CMAKE,$(dir_release),$(command)) && $(MAKE) @@ -47,18 +49,18 @@ debug-testnet: $(call CMAKE,$(dir_debug),$(command)) && $(MAKE) static: static-release -static-release: +static-release: ## Build release static binaries $(eval command += $(cmake_release) $(cmake_static)) $(call CMAKE,$(dir_release),$(command)) && $(MAKE) -static-release-testnet: +static-release-testnet: ## Build testnet release static binaries $(eval command += $(cmake_release) $(cmake_static) $(cmake_testnet)) $(call CMAKE,$(dir_release),$(command)) && $(MAKE) # # CI # -ci-linux-release: static-release +ci-linux-amd64-release: static-release ## Build lethean-linux-amd64-cli.tar.bz2 @rm -fr lethean && mkdir -p lethean @cp -r build/release/src/letheand lethean/letheand @cp -r build/release/src/lethean-cli-wallet lethean/lethean-cli-wallet @@ -66,7 +68,7 @@ ci-linux-release: static-release @tar -cjvf lethean-linux-amd64-cli.tar.bz2 lethean/ @rm -rf lethean -ci-linux-amd64-testnet: static-release-testnet +ci-linux-amd64-testnet: static-release-testnet ## Build testnet-lethean-linux-amd64-cli.tar.bz2 @rm -fr lethean && mkdir -p lethean @cp -r build/release/src/letheand lethean/letheand-testnet @cp -r build/release/src/lethean-cli-wallet lethean/lethean-cli-wallet-testnet @@ -74,7 +76,8 @@ ci-linux-amd64-testnet: static-release-testnet @tar -cjvf testnet-lethean-linux-amd64-cli.tar.bz2 lethean/ @rm -rf lethean - +conan: + @conan config install contrib/cmake/settings_user.yml # # GUI @@ -115,7 +118,7 @@ test-debug: $(call CMAKE,$(dir_debug),$(command)) && $(MAKE) && $(MAKE) test clean: - rm -rf build + rm -rf build/release build/debug macos-gui: bash ./utils/build/testnet_mac_osx_gui.sh @@ -123,4 +126,7 @@ macos-gui: tags: ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest +help: ## Show this help + @egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m make %-30s\033[0m %s\n", $$1, $$2}' + .PHONY: all release debug static static-release gui gui-release gui-static gui-release-static gui-debug test test-release test-debug clean tags macos-gui ci-testnet ci-release diff --git a/build/settings_user.yml b/build/settings_user.yml new file mode 100644 index 00000000..64e55a12 --- /dev/null +++ b/build/settings_user.yml @@ -0,0 +1,5 @@ +compiler: + gcc: + version: ["11.4.0"] + apple-clang: + version: ["15.0.0.15000040"] \ No newline at end of file