forked from lthn/blockchain
Refactor CI workflows and update CPack config
Split build jobs by architecture and OS in GitHub Actions workflows, add Docker and docs build jobs, and update artifact upload to create GitHub releases. Also update CPackConfig.cmake to use BUILD_VERSION for package versioning.
This commit is contained in:
parent
6e4d8f7683
commit
90417401ab
5 changed files with 69 additions and 27 deletions
9
.github/actions/upload-artifacts/action.yml
vendored
9
.github/actions/upload-artifacts/action.yml
vendored
|
|
@ -58,3 +58,12 @@ runs:
|
|||
with:
|
||||
name: ${{ steps.asset.outputs.key }}
|
||||
path: ${{ steps.asset.outputs.paths }}
|
||||
|
||||
- name: Make Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
continue-on-error: true
|
||||
with:
|
||||
tag_name: ${{ inputs.chain-network }}-${{ inputs.release-tag }}
|
||||
prerelease: contains(inputs.chain-network, 'testnet')
|
||||
files: ${{ inputs.asset-directory }}/lethean-*
|
||||
target_commitish: ${{ github.sha }}
|
||||
37
.github/workflows/_on-pr.yml
vendored
37
.github/workflows/_on-pr.yml
vendored
|
|
@ -14,30 +14,51 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
name: Compile
|
||||
build-linux-intel:
|
||||
name: Chain
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
uses: ./.github/workflows/build-linux-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows:
|
||||
name: Compile
|
||||
build-linux-arm:
|
||||
name: Chain
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
uses: ./.github/workflows/build-linux-arm64.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows-intel:
|
||||
name: Chain
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-windows-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-macos-arm64:
|
||||
name: Compile
|
||||
name: Chain
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-macos-arm64.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-macos-intel:
|
||||
name: Compile
|
||||
name: Chain
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-macos-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-docker:
|
||||
name: Docker
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
uses: ./.github/workflows/build-docker.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
secrets: inherit
|
||||
|
||||
build-docs:
|
||||
|
||||
if: github.event.review.state == 'approved' && !github.event.pull_request.draft
|
||||
name: Docs
|
||||
uses: ./.github/workflows/build-docs.yml
|
||||
|
|
|
|||
1
.github/workflows/_on-push.yml
vendored
1
.github/workflows/_on-push.yml
vendored
|
|
@ -8,7 +8,6 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- 'dev'
|
||||
- 'dev-*'
|
||||
- 'main'
|
||||
|
||||
concurrency:
|
||||
|
|
|
|||
45
.github/workflows/_on-release.yml
vendored
45
.github/workflows/_on-release.yml
vendored
|
|
@ -37,30 +37,43 @@ jobs:
|
|||
echo "Source Branch: $SOURCE_BRANCH"
|
||||
echo "Chain Network: ${{ steps.get_branch.outputs.chain_network }}"
|
||||
|
||||
build-linux:
|
||||
name: Compile
|
||||
needs: determine-network
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
build-linux-intel:
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-linux-intel.yml
|
||||
with:
|
||||
chain-network: ${{ needs.determine-network.outputs.chain-network }}
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows:
|
||||
name: Compile
|
||||
needs: determine-network
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
build-linux-arm:
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-linux-arm64.yml
|
||||
with:
|
||||
chain-network: ${{ needs.determine-network.outputs.chain-network }}
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows-intel:
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-windows-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-macos-arm64:
|
||||
name: Compile
|
||||
needs: determine-network
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-macos-arm64.yml
|
||||
with:
|
||||
chain-network: ${{ needs.determine-network.outputs.chain-network }}
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-macos-intel:
|
||||
name: Compile
|
||||
needs: determine-network
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-macos-intel.yml
|
||||
with:
|
||||
chain-network: ${{ needs.determine-network.outputs.chain-network }}
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-docker:
|
||||
name: Docker
|
||||
uses: ./.github/workflows/build-docker.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
secrets: inherit
|
||||
|
||||
build-docs:
|
||||
name: Docs
|
||||
uses: ./.github/workflows/build-docs.yml
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include(${CMAKE_SOURCE_DIR}/cmake/config-vars.cmake)
|
||||
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CPACK_PACKAGE_NAME "${package_name}")
|
||||
set(CPACK_PACKAGE_VENDOR "${package_vendor}")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${package_description}")
|
||||
set(CPACK_PACKAGE_VERSION "${package_version}")
|
||||
set(CPACK_PACKAGE_VERSION "${BUILD_VERSION}")
|
||||
set(CPACK_PACKAGE_CONTACT "${package_contact}")
|
||||
set(CPACK_PACKAGE_HOMEPAGE_URL "${package_website}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue