forked from lthn/blockchain
Set PRESET_CONFIGURE to 'conan-default' for Windows builds in Makefile and GitHub workflow. Broaden CPack packaging conditions to include additional build types and comment out WIX generator settings for Windows in CPackConfig.cmake.
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
name: build-windows
|
|
permissions:
|
|
contents: write
|
|
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:
|
|
cache:
|
|
name: cache-x86_64
|
|
runs-on: windows-latest
|
|
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 Dependencies
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
make build-deps CPU_CORES=4 TESTNET=${{ inputs.chain-network == 'testnet' && '1' || '0' }} CONAN_USER=ci-user CONAN_PASSWORD=${{ secrets.CONAN_PASSWORD }}
|
|
make upload-conan-cache
|
|
|
|
build:
|
|
name: compile-x86_64
|
|
needs: cache
|
|
runs-on: windows-latest
|
|
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
|
|
${{ github.workspace }}/build/bin
|
|
key: ${{ runner.os }}-${{ runner.arch }}-sdk
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.x
|
|
- 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 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/packages
|