From 36c38ab9c84b13394ef5c0e73675684568ce7af5 Mon Sep 17 00:00:00 2001 From: Snider Date: Sun, 28 Sep 2025 16:33:18 +0100 Subject: [PATCH] Update build system and version to 6.0.0 Refactored GitHub Actions workflows to upload specific package formats for each platform and standardized the release build process. Updated CMake and Makefile to support a configurable build version, now set to 6.0.0. Adjusted config and version headers to reflect the new versioning scheme and improved package configuration. --- .github/workflows/build-linux.yml | 18 +++++++++++------- .github/workflows/build-macos-arm64.yml | 11 +++++++++-- .github/workflows/build-macos-intel.yml | 19 ++++++++++++------- .github/workflows/build-windows.yml | 15 ++++++++++----- CMakeLists.txt | 10 +++++----- Makefile | 3 ++- cmake/ChainConfig.cmake | 2 +- cmake/config-vars.cmake | 2 +- src/CMakeLists.txt | 1 - src/version.h.in | 8 ++++---- 10 files changed, 55 insertions(+), 34 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 66d0eada..4a07e594 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -31,12 +31,16 @@ jobs: cache_packages: true - name: Compile Release - run: make gcc-linux-x86_64 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - name: CLI Artifacts - uses: ./.github/actions/upload-artifacts + - uses: actions/upload-artifact@v4 with: - chain-network: ${{ inputs.chain-network }} - assets: lethean-* - asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/gcc-linux-x86_64/src + path: ${{ github.workspace }}/build/release/packages/lethean-*.deb + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.zip diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml index d718ac43..004d94dc 100644 --- a/.github/workflows/build-macos-arm64.yml +++ b/.github/workflows/build-macos-arm64.yml @@ -36,8 +36,15 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: "${{ inputs.chain-network == 'testnet' && 'testnet-' || '' }}apple-clang-armv8" - path: ${{ github.workspace }}/build/release/packages/lethean-* + path: ${{ github.workspace }}/build/release/packages/lethean-*.pkg + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.zip # - 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 002094c8..ef4dbbf9 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -28,12 +28,17 @@ jobs: cache_packages: true - name: Compile Release - run: make apple-clang-x86_64 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} + run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - - name: CLI Artifacts - uses: ./.github/actions/upload-artifacts + - uses: actions/upload-artifact@v4 with: - chain-network: ${{ inputs.chain-network }} - assets: lethean-* - asset-type: 'cli' - asset-directory: ${{ github.workspace }}/build/apple-clang-x86_64/src + path: ${{ github.workspace }}/build/release/packages/lethean-*.pkg + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.zip + diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 75c5b2b5..e95b57ba 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -29,14 +29,19 @@ jobs: - name: Compile Release run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} -# -# - name: Compile Release -# run: make msvc-194-x86_64 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} - uses: actions/upload-artifact@v4 with: - name: "${{ inputs.chain-network == 'testnet' && 'testnet-' || '' }}cli-msvc-194-x86_64" - path: ${{ github.workspace }}/build/release/packages/lethean-* + path: ${{ github.workspace }}/build/release/packages/lethean-*.msi + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.tar.xz + + - uses: actions/upload-artifact@v4 + with: + path: ${{ github.workspace }}/build/release/packages/lethean-*.zip + # - name: CLI Artifacts # uses: ./.github/actions/upload-artifacts # with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ac781f4..1f00c0f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 3.16) set(DISABLE_TOR TRUE CACHE BOOL "Disable TOR library(and related tor-connect submodule)") PROJECT(Lethean) -set(VERSION "1.0") + +set(VERSION "1.0" CACHE STRING "Build version") + message("OPENSSL_INCLUDE_DIR: ${OPENSSL_INCLUDE_DIR}") message("OPENSSL_CRYPTO_LIBRARY: ${OPENSSL_CRYPTO_LIBRARY}") @@ -266,10 +268,6 @@ elseif(NOT MSVC AND NOT APPLE AND NOT CAKEWALLET AND STATIC) list(APPEND Boost_LIBRARIES icui18n.a icuuc.a icudata.a dl) endif() -if(BUILD_GUI) - find_package(Qt6 REQUIRED COMPONENTS Core5Compat Widgets WebEngineWidgets WebChannel PrintSupport) - message(STATUS "Found QT Packages") -endif() set(COMMIT_ID_IN_VERSION ON CACHE BOOL "Include commit ID in version") file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/version") @@ -297,6 +295,8 @@ else() endif() endif() +include(ChainConfig) + set(BUILD_TESTS FALSE CACHE BOOL "Build Lethean tests") set(DISABLE_MDBX FALSE CACHE BOOL "Exclude mdbx from build(need for a first time)") if(NOT DISABLE_MDBX) diff --git a/Makefile b/Makefile index 12acefab..4004b639 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ CPU_CORES := 1 TESTNET:= 0 BUILD_TYPE ?=Release +BUILD_VERSION:=6.0.0 # ----------------------------------------------------------------- # Unix‑like systems (Linux, macOS, *BSD, etc.) @@ -82,7 +83,7 @@ all: help release: conan-profile-detect @echo "Building profile: release $(TESTNET)" CONAN_HOME=$(CONAN_CACHE) conan install . --output-folder=build/release --build=missing -s build_type=$(BUILD_TYPE) - cmake -S . -B build/release -DCMAKE_TOOLCHAIN_FILE=build/release/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DTESTNET=$(TESTNET) + cmake -S . -B build/release -DCMAKE_TOOLCHAIN_FILE=build/release/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DTESTNET=$(TESTNET) -DBUILD_VERSION=$(BUILD_VERSION) cmake --build build/release --config=$(BUILD_TYPE) --parallel=$(CPU_CORES) (cd build/release && cpack) diff --git a/cmake/ChainConfig.cmake b/cmake/ChainConfig.cmake index 89d6823f..3eb3716c 100644 --- a/cmake/ChainConfig.cmake +++ b/cmake/ChainConfig.cmake @@ -4,7 +4,7 @@ include_directories (${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/currency_co include(${CMAKE_SOURCE_DIR}/cmake/config-vars.cmake) #include(${CMAKE_SOURCE_DIR}/cmake/currency_configs/example.cmake) include(${CMAKE_SOURCE_DIR}/cmake/check-config-vars.cmake) -configure_file("currency_core/currency_config.h.in" "currency_core/currency_config.h") +configure_file("src/currency_core/currency_config.h.in" "src/currency_core/currency_config.h") # CAUTION - wallet generation will only work properly in UNIX line environment set(GENERATE_FRESH_GENESIS OFF CACHE BOOL "Generate new genesis block") diff --git a/cmake/config-vars.cmake b/cmake/config-vars.cmake index 5b48dce0..1a5e62b7 100644 --- a/cmake/config-vars.cmake +++ b/cmake/config-vars.cmake @@ -42,7 +42,7 @@ endif () # installer config set(package_vendor "Lethean Community" CACHE STRING "CPACK_PACKAGE_VENDOR" ) set(package_description "A privacy‑preserving blockchain node" CACHE STRING "CPACK_PACKAGE_DESCRIPTION_SUMMARY" ) -set(package_version "1.0.0" CACHE STRING "CPACK_PACKAGE_VERSION" ) +set(package_version "${BUILD_VERSION}" CACHE STRING "CPACK_PACKAGE_VERSION" ) set(package_contact "support@lt.hn" CACHE STRING "CPACK_PACKAGE_CONTACT" ) set(package_website "https://github.com/letheanVPN/blockchain" CACHE STRING "CPACK_PACKAGE_HOMEPAGE_URL" ) set(package_macos_installer "PKG" CACHE STRING "CPACK_GENERATOR" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e98dab7a..f989e9f6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -50,7 +50,6 @@ MACRO(ENABLE_SHARED_PCH_EXECUTABLE target) ENDMACRO(ENABLE_SHARED_PCH_EXECUTABLE) ##### End of Precompiled Headers macros ###### -include(ChainConfig) file(GLOB_RECURSE PCH pch/*) file(GLOB_RECURSE COMMON common/*) diff --git a/src/version.h.in b/src/version.h.in index 3112b961..8149ce53 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -3,11 +3,11 @@ #define BUILD_COMMIT_ID "@VERSION@" -#define PROJECT_MAJOR_VERSION "2" -#define PROJECT_MINOR_VERSION "1" -#define PROJECT_REVISION "8" +#define PROJECT_MAJOR_VERSION "6" +#define PROJECT_MINOR_VERSION "0" +#define PROJECT_REVISION "0" #define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION -#define PROJECT_VERSION_BUILD_NO 428 +#define PROJECT_VERSION_BUILD_NO 1 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"