1
0
Fork 0
forked from lthn/blockchain

Refactor CI workflows and build process

Enable Conan package caching and remove redundant doc build steps from all platform workflows. Update Makefile to ensure docs are built as part of the release target. Clean up MSVC runtime variable logic in conanfile.py and adjust Docker workflow runner and build args.
This commit is contained in:
Snider 2025-10-01 23:52:43 +01:00
parent eba315040c
commit eadf6ebfec
8 changed files with 7 additions and 30 deletions

View file

@ -18,7 +18,7 @@ on:
jobs:
build:
name: "lthn/chain:${{ inputs.chain-network == 'testnet' && 'testnet' || 'latest' }}"
runs-on: ubuntu-24.04-arm
runs-on: ubuntu-24.04
steps:
- name: Checkout Project
uses: actions/checkout@v4.2.2
@ -48,7 +48,6 @@ jobs:
build-args: |
BUILD_TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
BUILD_THREADS=2
BUILD_LOCAL=1
target: builder
tags: lthn/chain:${{ inputs.chain-network == 'testnet' && 'testnet' || 'latest' }}
cache-from: type=registry,ref=lthn/chain:buildcache
@ -65,7 +64,6 @@ jobs:
build-args: |
BUILD_TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
BUILD_THREADS=2
BUILD_LOCAL=1
tags: lthn/chain:${{ inputs.chain-network == 'testnet' && 'testnet' || 'latest' }}
cache-from: type=registry,ref=lthn/chain:buildcache

View file

@ -41,10 +41,7 @@ jobs:
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
cache_packages: true
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -39,10 +39,7 @@ jobs:
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
cache_packages: true
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -39,10 +39,7 @@ jobs:
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
cache_packages: true
# - name: Compile Release
# run: make apple-clang-armv8 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -37,10 +37,7 @@ jobs:
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
cache_packages: true
- name: Compile Release
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -36,10 +36,7 @@ jobs:
uses: conan-io/setup-conan@v1
with:
home: ${{ github.workspace }}/build/sdk
cache_packages: false
- name: Compile Docs
run: make docs
cache_packages: true
- name: Compile Release
run: make release STATIC=1 CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}

View file

@ -102,7 +102,7 @@ endif
all: help
release: build
release: docs build
(cd $(BUILD_FOLDER) && cpack)
build: configure

View file

@ -33,12 +33,6 @@ class BlockchainConan(ConanFile):
tc.variables["TESTNET"] = self.options.testnet
# tc.preprocessor_definitions["TESTNET"] = None
# tc.variables["BUILD_VERSION"] = self.options.build_version
if self.settings.get_safe("compiler") == "msvc":
if self.options.static:
tc.variables["CMAKE_MSVC_RUNTIME_LIBRARY"] = "MultiThreaded$<$<CONFIG:Debug>:Debug>"
else:
tc.variables["CMAKE_MSVC_RUNTIME_LIBRARY"] = "MultiThreadedDLL$<$<CONFIG:Debug>:Debug>"
tc.generate()
deps = CMakeDeps(self)