1
0
Fork 0
forked from lthn/blockchain

ci-linux now uses pre-defined host/target profile

This commit is contained in:
Snider 2024-03-22 10:51:46 +00:00
parent 9c2e8c232a
commit 76521b0d0d
3 changed files with 26 additions and 8 deletions

View file

@ -19,6 +19,7 @@ cmake_testnet = -D TESTNET=ON -D BUILD_TESTS=OFF
cmake_static = -D STATIC=ON
cmake_tests = -D BUILD_TESTS=ON -D TESTNET=ON
# Helper macro
define CMAKE
mkdir -p $1 && cd $1 && $2 ../../
@ -30,6 +31,9 @@ dir_release = $(build)/release
current_dir := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))
export CONAN_HOME = $(current_dir)$(build)
conan_profile_linux = $(CONAN_HOME)/profiles/linux-amd64
conan_toolchain = -DCMAKE_TOOLCHAIN_FILE=$(CONAN_HOME)/build/Release/generators/conan_toolchain.cmake
all: help
release: ## Build release non-static binaries
@ -84,9 +88,18 @@ ci-macos-amd64-release: static-release ci-package-linux ## Build lethean-macos-a
ci-macos-arm64-release: static-release ci-package-linux ## Build lethean-macos-arm64-cli.tar.bz2
@tar -cjvf lethean-macos-arm64-cli.tar.bz2 lethean/
ci-linux-amd64-testnet: static-release-testnet ci-package-linux ## Build testnet-lethean-linux-amd64-cli.tar.bz2
ci-linux-amd64-testnet: ## Build testnet-lethean-linux-amd64-cli.tar.bz2
conan install ./contrib/cmake -of=./build/release/conan --profile:build=$(conan_profile_linux) --profile:host=$(conan_profile_linux) --build=missing
(cd build/release && cmake ../../ -DCMAKE_BUILD_TYPE=Release $(conan_toolchain) $(cmake_static) $(cmake_testnet))
(cd build/release && cmake --build .)
@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
@chmod +x lethean/lethean*
@tar -cjvf testnet-lethean-linux-amd64-cli.tar.bz2 lethean/
ci-windows-amd64-testnet: static-release-testnet ci-package-windows ## Build testnet-lethean-windows-amd64-cli.tar.bz2
@tar -cjvf testnet-lethean-windows-amd64-cli.tar.bz2 lethean/

View file

@ -0,0 +1,8 @@
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux

View file

@ -1,14 +1,15 @@
# This file is managed by Conan, contents will be overwritten.
# To keep your changes, remove these comment lines, but the plugin won't be able to modify your requirements
import os
from io import StringIO
from conan import ConanFile
from conan.tools.files import load, copy
from conan.tools.cmake import cmake_layout, CMakeToolchain
from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain
class ConanApplication(ConanFile):
package_type = "application"
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeDeps"
generators = "CMakeDeps", "CMakeToolchain"
def layout(self):
# The root of the project is one level above
@ -18,12 +19,8 @@ class ConanApplication(ConanFile):
#self.folders.build = "build"
cmake_layout(self)
def generate(self):
tc = CMakeToolchain(self)
tc.user_presets_path = False
tc.generate()
def requirements(self):
requirements = self.conan_data.get('requirements', [])
#self.requires("qt/5.15.13", options={"shared":True, "qtwebengine":True, "gui": True, "qtwebchannel": True, "qtlocation": True, "qtdeclarative": True})
for requirement in requirements:
self.requires(requirement)