forked from lthn/blockchain
Enhance CI workflows by adding caching steps for various platforms and enabling lookup-only mode for improved efficiency
This commit is contained in:
parent
8fab38662c
commit
0181c86283
7 changed files with 152 additions and 12 deletions
1
.github/workflows/_on-pr.yml
vendored
1
.github/workflows/_on-pr.yml
vendored
|
|
@ -7,6 +7,7 @@ on:
|
|||
pull_request_review:
|
||||
pull_request:
|
||||
types:
|
||||
- ready_for_review
|
||||
- review_requested
|
||||
- closed
|
||||
|
||||
|
|
|
|||
1
.github/workflows/_on-push.yml
vendored
1
.github/workflows/_on-push.yml
vendored
|
|
@ -9,6 +9,7 @@ on:
|
|||
branches:
|
||||
- 'dev'
|
||||
- 'main'
|
||||
- 'dev-*'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
|
|||
37
.github/workflows/build-linux-arm64.yml
vendored
37
.github/workflows/build-linux-arm64.yml
vendored
|
|
@ -11,8 +11,45 @@ on:
|
|||
type: string
|
||||
|
||||
jobs:
|
||||
cache:
|
||||
name: gcc-linux-arm64
|
||||
runs-on: ubuntu-22.04-arm
|
||||
steps:
|
||||
- name: Cache SDK Folder
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/build/sdk
|
||||
${{ github.workspace }}/build/bin
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Checkout Project
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: sudo apt-get install -y autotools-dev git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
|
||||
|
||||
- name: Compile Release
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make release CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
build:
|
||||
name: gcc-linux-arm64
|
||||
needs: cache
|
||||
runs-on: ubuntu-22.04-arm
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
|
|
|
|||
38
.github/workflows/build-linux-intel.yml
vendored
38
.github/workflows/build-linux-intel.yml
vendored
|
|
@ -11,8 +11,46 @@ on:
|
|||
type: string
|
||||
|
||||
jobs:
|
||||
cache:
|
||||
name: gcc-linux-x86_64
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Cache SDK Folder
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
lookup-only: true
|
||||
path: |
|
||||
${{ github.workspace }}/build/sdk
|
||||
${{ github.workspace }}/build/bin
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Checkout Project
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: install dependencies
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: sudo apt-get install -y autotools-dev git build-essential
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
python-version: 3.x
|
||||
- if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
|
||||
|
||||
- name: Compile Release
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
|
||||
build:
|
||||
name: gcc-linux-x86_64
|
||||
needs: cache
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
|
|
|
|||
41
.github/workflows/build-macos-arm64.yml
vendored
41
.github/workflows/build-macos-arm64.yml
vendored
|
|
@ -12,9 +12,43 @@ on:
|
|||
|
||||
|
||||
jobs:
|
||||
build-cli:
|
||||
cache:
|
||||
name: apple-clang-armv8
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- name: Cache SDK Folder
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
lookup-only: true
|
||||
path: |
|
||||
${{ github.workspace }}/build/sdk
|
||||
${{ github.workspace }}/build/bin
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Checkout Project
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
|
||||
|
||||
- name: Compile Release
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make build-deps CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
build:
|
||||
name: apple-clang-armv8
|
||||
needs: cache
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4.2.2
|
||||
|
|
@ -22,7 +56,6 @@ jobs:
|
|||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
|
||||
- name: Cache SDK Folder
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
|
|
@ -37,13 +70,9 @@ jobs:
|
|||
|
||||
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
|
||||
|
||||
# - name: Compile Release
|
||||
# run: make apple-clang-armv8 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
- name: Compile Release
|
||||
run: make release CPU_CORES=3 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
|
||||
- name: CLI Artifacts
|
||||
uses: ./.github/actions/upload-artifacts
|
||||
with:
|
||||
|
|
|
|||
33
.github/workflows/build-macos-intel.yml
vendored
33
.github/workflows/build-macos-intel.yml
vendored
|
|
@ -11,8 +11,41 @@ on:
|
|||
type: string
|
||||
|
||||
jobs:
|
||||
cache:
|
||||
name: apple-clang-x86_64
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- name: Cache SDK Folder
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
lookup-only: true
|
||||
path: |
|
||||
${{ github.workspace }}/build/sdk
|
||||
${{ github.workspace }}/build/bin
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Checkout Project
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
python-version: 3.x
|
||||
- if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-git-authors-plugin "mkdocs-material[imaging]"
|
||||
|
||||
- name: Compile Release
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }}
|
||||
|
||||
build:
|
||||
name: apple-clang-x86_64
|
||||
needs: cache
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
|
|
|
|||
13
.github/workflows/build-windows-intel.yml
vendored
13
.github/workflows/build-windows-intel.yml
vendored
|
|
@ -15,12 +15,6 @@ jobs:
|
|||
name: cache-msvc-194-x86_64
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Cache SDK Folder
|
||||
id: cache
|
||||
uses: actions/cache@v4
|
||||
|
|
@ -31,6 +25,13 @@ jobs:
|
|||
${{ github.workspace }}/build/bin
|
||||
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
||||
|
||||
- name: Checkout Project
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4.2.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue