diff --git a/.github/workflows/_on-push.yml b/.github/workflows/_on-push.yml index 036ea78e..6af0f647 100644 --- a/.github/workflows/_on-push.yml +++ b/.github/workflows/_on-push.yml @@ -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' }} diff --git a/.github/workflows/build-linux-arm64.yml b/.github/workflows/build-linux-arm64.yml new file mode 100644 index 00000000..8e27fa66 --- /dev/null +++ b/.github/workflows/build-linux-arm64.yml @@ -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 diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux-intel.yml similarity index 88% rename from .github/workflows/build-linux.yml rename to .github/workflows/build-linux-intel.yml index 89094a1b..63390528 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux-intel.yml @@ -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 diff --git a/.github/workflows/build-macos-arm64.yml b/.github/workflows/build-macos-arm64.yml index c549e0f7..de10e2fb 100644 --- a/.github/workflows/build-macos-arm64.yml +++ b/.github/workflows/build-macos-arm64.yml @@ -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 diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index c664a3ce..72913593 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -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 diff --git a/.github/workflows/build-windows-arm64.yml b/.github/workflows/build-windows-arm64.yml new file mode 100644 index 00000000..c48559f4 --- /dev/null +++ b/.github/workflows/build-windows-arm64.yml @@ -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 diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows-intel.yml similarity index 87% rename from .github/workflows/build-windows.yml rename to .github/workflows/build-windows-intel.yml index ba6db426..66c9ab1e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows-intel.yml @@ -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