diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml index 794ebfe475ec9e..3f17f024c67a39 100644 --- a/.github/workflows/build-container.yml +++ b/.github/workflows/build-container.yml @@ -2,6 +2,12 @@ name: Build container on: workflow_call: + inputs: + runs-on: + description: "Runner for building container" + required: false + type: string + default: "ubuntu-24.04-arm" outputs: path: description: "Path to built container" @@ -13,7 +19,7 @@ env: jobs: build: name: Build container - runs-on: ubuntu-24.04-arm + runs-on: ${{ inputs.runs-on }} outputs: tag: ${{ steps.prepare.outputs.tag }} repo: ${{ steps.prepare.outputs.repo }} diff --git a/.github/workflows/build-depends.yml b/.github/workflows/build-depends.yml index 84a1727daecf21..cada5e7082901d 100644 --- a/.github/workflows/build-depends.yml +++ b/.github/workflows/build-depends.yml @@ -11,6 +11,11 @@ on: description: "Path to built container at registry" required: true type: string + runs-on: + description: "Runner for building depends" + required: false + type: string + default: "ubuntu-24.04-arm" outputs: key: description: "Key needed for restoring depends cache" @@ -19,9 +24,9 @@ on: jobs: build-depends: name: Build depends - runs-on: ubuntu-24.04-arm + runs-on: ${{ inputs.runs-on }} outputs: - key: ${{ steps.restore.outputs.cache-primary-key }} + key: ${{ steps.restore.outputs.cache-primary-key }} container: image: ${{ inputs.container-path }} options: --user root @@ -41,7 +46,6 @@ jobs: DEP_HASH="$(echo -n "${BUILD_TARGET}" "${DEP_OPTS}" "${HOST}" | sha256sum | head -c 64)" echo "\"${BUILD_TARGET}\" has HOST=\"${HOST}\" and DEP_OPTS=\"${DEP_OPTS}\" with hash \"${DEP_HASH}\"" echo "DEP_HASH=${DEP_HASH}" >> "${GITHUB_OUTPUT}" - shell: bash - name: Cache depends sources @@ -77,7 +81,7 @@ jobs: - name: Build depends run: | - export HOST="${{ steps.setup.outputs.HOST }}" + export HOST="${{ steps.setup.outputs.HOST }}" if [ "${HOST}" = "x86_64-apple-darwin" ]; then ./contrib/containers/guix/scripts/setup-sdk fi @@ -90,4 +94,4 @@ jobs: path: | depends/built depends/${{ steps.setup.outputs.HOST }} - key: ${{ steps.restore.outputs.cache-primary-key }} + key: ${{ steps.restore.outputs.cache-primary-key }} \ No newline at end of file diff --git a/.github/workflows/build-src.yml b/.github/workflows/build-src.yml index 03c73accfe66a2..79e845289798ab 100644 --- a/.github/workflows/build-src.yml +++ b/.github/workflows/build-src.yml @@ -15,11 +15,15 @@ on: description: "Key needed to access cached depends" required: true type: string - + runs-on: + description: "Runner for building source" + required: false + type: string + default: "ubuntu-24.04-arm" jobs: build-src: name: Build source - runs-on: ubuntu-24.04-arm + runs-on: ${{ inputs.runs-on }} container: image: ${{ inputs.container-path }} options: --user root @@ -88,4 +92,4 @@ jobs: with: name: build-artifacts-${{ inputs.build-target }} path: | - /output + /output \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b14bf2dfa1eeb..5df59d69cfbad2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,144 +13,168 @@ env: FAST_MODE: false jobs: - container: - name: Build container + container-arm: + name: Build container (arm) uses: ./.github/workflows/build-container.yml + with: + runs-on: ubuntu-24.04-arm + + container-x86: + name: Build container (x86) + uses: ./.github/workflows/build-container.yml + with: + runs-on: ubuntu-24.04 depends-arm-linux: name: arm-linux-gnueabihf uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-arm] with: build-target: arm-linux - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} + runs-on: ubuntu-24.04-arm depends-linux64: name: x86_64-pc-linux-gnu uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-arm] with: build-target: linux64 - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} + runs-on: ubuntu-24.04-arm depends-linux64_multiprocess: name: x86_64-pc-linux-gnu_multiprocess uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-arm] with: build-target: linux64_multiprocess - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} + runs-on: ubuntu-24.04-arm depends-linux64_nowallet: name: x86_64-pc-linux-gnu_nowallet uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-x86] with: build-target: linux64_nowallet - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} + runs-on: ubuntu-24.04 depends-mac: name: x86_64-apple-darwin uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-x86] with: build-target: mac - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} + runs-on: ubuntu-24.04 depends-win64: name: x86_64-w64-mingw32 uses: ./.github/workflows/build-depends.yml - needs: [container] + needs: [container-x86] with: build-target: win64 - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} + runs-on: ubuntu-24.04 src-arm-linux: name: arm-linux-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-arm-linux] + needs: [container-arm, depends-arm-linux] with: build-target: arm-linux - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-arm-linux.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64: name: linux64-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64] + needs: [container-arm, depends-linux64] with: build-target: linux64 - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64_fuzz: name: linux64_fuzz-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64] + needs: [container-arm, depends-linux64] with: build-target: linux64_fuzz - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64_multiprocess: name: linux64_multiprocess-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64_multiprocess] + needs: [container-arm, depends-linux64_multiprocess] with: build-target: linux64_multiprocess - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64_nowallet: name: linux64_nowallet-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64_nowallet] + needs: [container-x86, depends-linux64_nowallet] with: build-target: linux64_nowallet - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} depends-key: ${{ needs.depends-linux64_nowallet.outputs.key }} + runs-on: ubuntu-24.04 src-linux64_sqlite: name: linux64_sqlite-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64] + needs: [container-arm, depends-linux64] with: build-target: linux64_sqlite - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64_tsan: name: linux64_tsan-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64_multiprocess] + needs: [container-arm, depends-linux64_multiprocess] with: build-target: linux64_tsan - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64_multiprocess.outputs.key }} + runs-on: ubuntu-24.04-arm src-linux64_ubsan: name: linux64_ubsan-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-linux64] + needs: [container-arm, depends-linux64] with: build-target: linux64_ubsan - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-arm.outputs.path }} depends-key: ${{ needs.depends-linux64.outputs.key }} + runs-on: ubuntu-24.04-arm src-mac: name: mac-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-mac] + needs: [container-x86, depends-mac] with: build-target: mac - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} depends-key: ${{ needs.depends-mac.outputs.key }} + runs-on: ubuntu-24.04 src-win64: name: win64-build uses: ./.github/workflows/build-src.yml - needs: [container, depends-win64] + needs: [container-x86, depends-win64] with: build-target: win64 - container-path: ${{ needs.container.outputs.path }} + container-path: ${{ needs.container-x86.outputs.path }} depends-key: ${{ needs.depends-win64.outputs.key }} + runs-on: ubuntu-24.04 \ No newline at end of file