diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e28c73a062..eec0ebcf09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ concurrency: env: RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"' RUST_LOG: info,libp2p=off,node=error + DOCKER_PLATFORMS: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }} jobs: build: @@ -86,6 +87,7 @@ jobs: target/release/dev-rollup build-arm: + if: github.event_name != 'pull_request' runs-on: buildjet-8vcpu-ubuntu-2204-arm env: CARGO_BUILD_JOBS: '6' @@ -145,6 +147,8 @@ jobs: build-dockers: runs-on: ubuntu-latest needs: [build, build-arm] + # if build_arm is skipped, run this job anyway + if: ${{ !(failure() || cancelled()) }} outputs: sequencer-tag: ${{ steps.sequencer.outputs.tags }} cdn-broker-tag: ${{ steps.cdn-broker.outputs.tags }} @@ -176,6 +180,7 @@ jobs: path: target/amd64/release - name: Download executables ARM + if: github.event_name != 'pull_request' uses: actions/download-artifact@v4 with: name: aarch64-unknown-linux-gnu-services @@ -300,7 +305,7 @@ jobs: with: context: ./ file: ./docker/sequencer.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.sequencer.outputs.tags }} labels: ${{ steps.sequencer.outputs.labels }} @@ -310,7 +315,7 @@ jobs: with: context: ./ file: ./docker/cdn-broker.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.cdn-broker.outputs.tags }} labels: ${{ steps.cdn-broker.outputs.labels }} @@ -320,7 +325,7 @@ jobs: with: context: ./ file: ./docker/cdn-marshal.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.cdn-marshal.outputs.tags }} labels: ${{ steps.cdn-marshal.outputs.labels }} @@ -330,7 +335,7 @@ jobs: with: context: ./ file: ./docker/cdn-whitelist.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.cdn-whitelist.outputs.tags }} labels: ${{ steps.cdn-whitelist.outputs.labels }} @@ -340,7 +345,7 @@ jobs: with: context: ./ file: ./docker/state-relay-server.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.state-relay-server.outputs.tags }} labels: ${{ steps.state-relay-server.outputs.labels }} @@ -350,7 +355,7 @@ jobs: with: context: ./ file: ./docker/prover-service.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.prover-service.outputs.tags }} labels: ${{ steps.prover-service.outputs.labels }} @@ -360,7 +365,7 @@ jobs: with: context: ./ file: ./docker/orchestrator.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.orchestrator.outputs.tags }} labels: ${{ steps.orchestrator.outputs.labels }} @@ -370,7 +375,7 @@ jobs: with: context: ./ file: ./docker/submit-transactions.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.submit-transactions.outputs.tags }} labels: ${{ steps.submit-transactions.outputs.labels }} @@ -380,7 +385,7 @@ jobs: with: context: ./ file: ./docker/deploy.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.deploy.outputs.tags }} labels: ${{ steps.deploy.outputs.labels }} @@ -390,7 +395,7 @@ jobs: with: context: ./ file: ./docker/permissionless-builder.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.builder.outputs.tags }} labels: ${{ steps.builder.outputs.labels }} @@ -400,7 +405,7 @@ jobs: with: context: ./ file: ./docker/nasty-client.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.nasty-client.outputs.tags }} labels: ${{ steps.nasty-client.outputs.labels }} @@ -410,7 +415,7 @@ jobs: with: context: ./ file: ./docker/espresso-dev-node.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.espresso-dev-node.outputs.tags }} labels: ${{ steps.espresso-dev-node.outputs.labels }} @@ -419,7 +424,7 @@ jobs: with: context: ./ file: ./docker/espresso-bridge.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.bridge.outputs.tags }} labels: ${{ steps.bridge.outputs.labels }} @@ -429,7 +434,7 @@ jobs: with: context: ./ file: ./docker/marketplace-solver.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.marketplace-solver.outputs.tags }} labels: ${{ steps.marketplace-solver.outputs.labels }} @@ -439,7 +444,7 @@ jobs: with: context: ./ file: ./docker/marketplace-builder.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.marketplace-builder.outputs.tags }} labels: ${{ steps.marketplace-builder.outputs.labels }} @@ -449,7 +454,7 @@ jobs: with: context: ./ file: ./docker/node-validator.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.node-validator.outputs.tags }} labels: ${{ steps.node-validator.outputs.labels }} @@ -459,7 +464,7 @@ jobs: with: context: ./ file: ./docker/dev-rollup.Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: ${{ env.DOCKER_PLATFORMS }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.dev-rollup.outputs.tags }} labels: ${{ steps.dev-rollup.outputs.labels }}