forked from lthn/blockchain
Add ARM64 build workflows and refactor CI for multi-arch
Introduced separate build workflows for Linux and Windows ARM64 architectures. Renamed existing Intel build workflows for clarity and updated the main workflow to trigger both Intel and ARM64 builds for Linux and Windows. Improved caching by including architecture in cache keys and set CPU_CORES for release builds across all platforms.
This commit is contained in:
parent
ef016f50fb
commit
76d33a74b1
7 changed files with 117 additions and 12 deletions
20
.github/workflows/_on-push.yml
vendored
20
.github/workflows/_on-push.yml
vendored
|
|
@ -16,15 +16,27 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build-linux:
|
||||
build-linux-intel:
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
uses: ./.github/workflows/build-linux-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows:
|
||||
build-linux-arm:
|
||||
name: Chain
|
||||
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
|
||||
uses: ./.github/workflows/build-windows-intel.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
build-windows-arm:
|
||||
name: Chain
|
||||
uses: ./.github/workflows/build-windows-arm64.yml
|
||||
with:
|
||||
chain-network: ${{ github.ref_name == 'main' && 'mainnet' || 'testnet' }}
|
||||
|
||||
|
|
|
|||
48
.github/workflows/build-linux-arm64.yml
vendored
Normal file
48
.github/workflows/build-linux-arm64.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Linux
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
chain-network:
|
||||
description: "The network to use, can either be testnet, stagenet or mainnet"
|
||||
default: testnet
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: gcc-linux-arm64
|
||||
runs-on: ubuntu-22.04-arm
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies
|
||||
run: sudo apt-get install -y autotools-dev git build-essential
|
||||
|
||||
- name: Cache SDK Folder
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
with:
|
||||
home: ${{ github.workspace }}/build/sdk
|
||||
cache_packages: false
|
||||
|
||||
- name: Compile Release
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
with:
|
||||
chain-network: ${{ inputs.chain-network }}
|
||||
assets: lethean-*
|
||||
asset-type: 'cli'
|
||||
asset-directory: ${{ github.workspace }}/build/release/packages
|
||||
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
|
|
@ -37,7 +37,7 @@ jobs:
|
|||
cache_packages: false
|
||||
|
||||
- name: Compile Release
|
||||
run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
4
.github/workflows/build-macos-arm64.yml
vendored
4
.github/workflows/build-macos-arm64.yml
vendored
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
|
|
@ -39,7 +39,7 @@ jobs:
|
|||
# run: make apple-clang-armv8 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: Compile Release
|
||||
run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
|
||||
- name: CLI Artifacts
|
||||
|
|
|
|||
4
.github/workflows/build-macos-intel.yml
vendored
4
.github/workflows/build-macos-intel.yml
vendored
|
|
@ -26,7 +26,7 @@ jobs:
|
|||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
|
|
@ -35,7 +35,7 @@ jobs:
|
|||
cache_packages: false
|
||||
|
||||
- name: Compile Release
|
||||
run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
|
|
|
|||
45
.github/workflows/build-windows-arm64.yml
vendored
Normal file
45
.github/workflows/build-windows-arm64.yml
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
name: build-windows
|
||||
permissions:
|
||||
contents: read
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
chain-network:
|
||||
description: "The network to use, can either be testnet, stagenet or mainnet"
|
||||
default: testnet
|
||||
required: false
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
msvc-194:
|
||||
name: msvc-194-arm64
|
||||
runs-on: windows-11-arm
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache SDK Folder
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
with:
|
||||
home: ${{ github.workspace }}/build/sdk
|
||||
cache_packages: false
|
||||
|
||||
- name: Compile Release
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
with:
|
||||
chain-network: ${{ inputs.chain-network }}
|
||||
assets: lethean-*
|
||||
asset-type: 'cli'
|
||||
asset-directory: ${{ github.workspace }}/build/release/packages
|
||||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/build/sdk
|
||||
key: ${{ runner.os }}-sdk
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Install Conan
|
||||
uses: conan-io/setup-conan@v1
|
||||
|
|
@ -34,7 +34,7 @@ jobs:
|
|||
cache_packages: false
|
||||
|
||||
- name: Compile Release
|
||||
run: make release TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
Loading…
Add table
Reference in a new issue