Skip to content

Commit

Permalink
Merge pull request #172 from ethpandaops/skylenet/prysm-grandine-para…
Browse files Browse the repository at this point in the history
…llel

prysm/grandine: parallel minimal builds
  • Loading branch information
skylenet authored May 14, 2024
2 parents 54029a7 + a539437 commit 3b91af6
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 29 deletions.
36 changes: 27 additions & 9 deletions .github/workflows/build-push-grandine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,39 @@ jobs:
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
# Minimal preset
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./grandine/build.sh
target_dockerfile: ./grandine/Dockerfile.minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}-minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_repository: ethpandaops/grandine
platform: ${{ matrix.platform }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
GOPROXY: "${{ vars.GOPROXY }}"
# Default preset
deploy-minimal:
needs:
- prepare
runs-on: ${{ matrix.runner }}
continue-on-error: true
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./grandine/build.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_dockerfile: ./grandine/Dockerfile.minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal-${{ matrix.slug }}
target_repository: ethpandaops/grandine
platform: ${{ matrix.platform }}

Expand All @@ -79,23 +90,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Minimal preset
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_repository: ethpandaops/grandine
platforms: ${{ needs.prepare.outputs.platforms }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
# Default preset
manifest-minimal:
needs:
- prepare
- deploy-minimal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_repository: ethpandaops/grandine
platforms: ${{ needs.prepare.outputs.platforms }}

Expand All @@ -107,7 +123,9 @@ jobs:
needs:
- prepare
- deploy
- deploy-minimal
- manifest
- manifest-minimal
if: failure()
steps:
- name: Notify
Expand Down
76 changes: 56 additions & 20 deletions .github/workflows/build-push-prysm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ jobs:
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
# Build minimal preset
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./prysm/build_beacon_minimal.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}-minimal
build_script: ./prysm/build_beacon.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_repository: ethpandaops/prysm-beacon-chain
target_dockerfile: ./prysm/Dockerfile.beacon
platform: ${{ matrix.platform }}
Expand All @@ -58,13 +57,25 @@ jobs:
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
GOPROXY: "${{ vars.GOPROXY }}"
# Build default preset
deploy-beacon-minimal:
needs:
- prepare
runs-on: ${{ matrix.runner }}
continue-on-error: true
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./prysm/build_beacon.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
build_script: ./prysm/build_beacon_minimal.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal-${{ matrix.slug }}
target_repository: ethpandaops/prysm-beacon-chain
target_dockerfile: ./prysm/Dockerfile.beacon
platform: ${{ matrix.platform }}
Expand All @@ -86,13 +97,12 @@ jobs:
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
# Build minimal preset
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./prysm/build_validator_minimal.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}-minimal
build_script: ./prysm/build_validator.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
target_repository: ethpandaops/prysm-validator
target_dockerfile: ./prysm/Dockerfile.validator
platform: ${{ matrix.platform }}
Expand All @@ -101,13 +111,25 @@ jobs:
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
MACOS_PASSWORD: "${{ secrets.MACOS_PASSWORD }}"
GOPROXY: "${{ vars.GOPROXY }}"
# Build default preset
deploy-validator-minimal:
needs:
- prepare
runs-on: ${{ matrix.runner }}
continue-on-error: true
strategy:
matrix:
include: ${{fromJson(needs.prepare.outputs.platforms)}}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-deps
with:
repository: ${{ inputs.repository }}
- uses: ./.github/actions/deploy
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
build_script: ./prysm/build_validator.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-${{ matrix.slug }}
build_script: ./prysm/build_validator_minimal.sh
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal-${{ matrix.slug }}
target_repository: ethpandaops/prysm-validator
target_dockerfile: ./prysm/Dockerfile.validator
platform: ${{ matrix.platform }}
Expand All @@ -123,23 +145,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Minimal preset
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_repository: ethpandaops/prysm-beacon-chain
platforms: ${{ needs.prepare.outputs.platforms }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
# Default preset
manifest-beacon-minimal:
needs:
- prepare
- deploy-beacon-minimal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_repository: ethpandaops/prysm-beacon-chain
platforms: ${{ needs.prepare.outputs.platforms }}

Expand All @@ -152,23 +179,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Minimal preset
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_repository: ethpandaops/prysm-validator
platforms: ${{ needs.prepare.outputs.platforms }}

DOCKER_USERNAME: "${{ vars.DOCKER_USERNAME }}"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"
# Default preset
manifest-validator-minimal:
needs:
- prepare
- deploy-validator-minimal
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/manifest
with:
source_repository: ${{ inputs.repository }}
source_ref: ${{ inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}
target_tag: ${{ inputs.docker_tag || inputs.ref }}-minimal
target_repository: ethpandaops/prysm-validator
platforms: ${{ needs.prepare.outputs.platforms }}

Expand All @@ -180,9 +212,13 @@ jobs:
needs:
- prepare
- deploy-beacon
- deploy-beacon-minimal
- deploy-validator
- deploy-validator-minimal
- manifest-beacon
- manifest-beacon-minimal
- manifest-validator
- manifest-validator-minimal
if: failure()
steps:
- name: Notify
Expand Down

0 comments on commit 3b91af6

Please sign in to comment.