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:
parent
eba315040c
commit
eadf6ebfec
8 changed files with 7 additions and 30 deletions
4
.github/workflows/build-docker.yml
vendored
4
.github/workflows/build-docker.yml
vendored
|
|
@ -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
|
||||
|
||||
|
|
|
|||
5
.github/workflows/build-linux-arm64.yml
vendored
5
.github/workflows/build-linux-arm64.yml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
5
.github/workflows/build-linux-intel.yml
vendored
5
.github/workflows/build-linux-intel.yml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
5
.github/workflows/build-macos-arm64.yml
vendored
5
.github/workflows/build-macos-arm64.yml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
5
.github/workflows/build-macos-intel.yml
vendored
5
.github/workflows/build-macos-intel.yml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
5
.github/workflows/build-windows-intel.yml
vendored
5
.github/workflows/build-windows-intel.yml
vendored
|
|
@ -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' }}
|
||||
|
|
|
|||
2
Makefile
2
Makefile
|
|
@ -102,7 +102,7 @@ endif
|
|||
|
||||
all: help
|
||||
|
||||
release: build
|
||||
release: docs build
|
||||
(cd $(BUILD_FOLDER) && cpack)
|
||||
|
||||
build: configure
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue