forked from lthn/blockchain
This pull request introduces a comprehensive new API interface for the blockchain, leveraging OpenAPI v3 to facilitate direct consumption of chain data by GUI and web applications. This change significantly refines the project's build infrastructure, incorporating Conan for dependency management and CMake for configuration, alongside the integration of an OpenAPI Generator to produce SDKs for multiple languages. ### Highlights * **New API Interface**: Introduced a new API interface using OpenAPI v3 to enable GUI/WEB development to consume chain data without needing custom server applications. * **Build System Enhancements**: Significant updates to the build system, including Makefile, CMake, and Conan configurations, to streamline the build process and support new functionalities. * **Multi-language SDK Generation**: Integrated OpenAPI Generator to automatically create SDKs for various programming languages, including Go, Angular, and PHP, simplifying client-side integration.
90 lines
2.9 KiB
YAML
90 lines
2.9 KiB
YAML
name: Linux
|
|
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-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 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-arm64
|
|
needs: cache
|
|
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 rpm git build-essential libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant
|
|
|
|
- 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 ${{ inputs.chain-network }}
|
|
|
|
- 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
|