forked from lthn/blockchain
moves conan settings into Makefile
This commit is contained in:
parent
70c79745f1
commit
7ea697ac0d
4 changed files with 30 additions and 14 deletions
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
9
.github/workflows/cli-testnet.yml
vendored
9
.github/workflows/cli-testnet.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
24
Makefile
24
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
|
||||
|
|
|
|||
5
build/settings_user.yml
Normal file
5
build/settings_user.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
compiler:
|
||||
gcc:
|
||||
version: ["11.4.0"]
|
||||
apple-clang:
|
||||
version: ["15.0.0.15000040"]
|
||||
Loading…
Add table
Reference in a new issue