Skip to content

Commit

Permalink
update dockers
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-maron committed Mar 26, 2024
1 parent 4ebefe9 commit 1fd42ac
Show file tree
Hide file tree
Showing 13 changed files with 116 additions and 178 deletions.
91 changes: 65 additions & 26 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,33 +40,32 @@ jobs:
tar -vxf just-1.14.0-x86_64-unknown-linux-musl.tar.gz just
sudo cp just /usr/bin/just
- name: Build all crates in workspace
run: just ${{ matrix.just_variants }} build

- name: Build HotShot in release mode
run: just ${{ matrix.just_variants }} build_release

- name: Unit and integration tests for all crates in workspace
run: |
just ${{ matrix.just_variants }} test-ci
timeout-minutes: 60
env:
RUST_BACKTRACE: full

- name: Build examples in release mode
run: just ${{ matrix.just_variants }} build_release --examples --package hotshot-examples --no-default-features --features="docs,doc-images"

- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: binaries-amd64-${{ matrix.just_variants }}
path: |
target/${{ matrix.just_variants }}/debug/examples/counter
target/${{ matrix.just_variants }}/debug/examples/multi-validator-libp2p
target/${{ matrix.just_variants }}/debug/examples/orchestrator-libp2p
target/${{ matrix.just_variants }}/debug/examples/validator-libp2p
target/${{ matrix.just_variants }}/debug/examples/multi-validator-webserver
target/${{ matrix.just_variants }}/debug/examples/multi-webserver
target/${{ matrix.just_variants }}/debug/examples/webserver
target/${{ matrix.just_variants }}/debug/examples/orchestrator-webserver
target/${{ matrix.just_variants }}/debug/examples/validator-webserver
target/${{ matrix.just_variants }}/release/examples/counter
target/${{ matrix.just_variants }}/release/examples/multi-validator-libp2p
target/${{ matrix.just_variants }}/release/examples/orchestrator-libp2p
target/${{ matrix.just_variants }}/release/examples/validator-libp2p
target/${{ matrix.just_variants }}/release/examples/multi-validator-webserver
target/${{ matrix.just_variants }}/release/examples/multi-webserver
target/${{ matrix.just_variants }}/release/examples/webserver
target/${{ matrix.just_variants }}/release/examples/orchestrator-webserver
target/${{ matrix.just_variants }}/release/examples/validator-webserver
target/${{ matrix.just_variants }}/release/examples/cdn-broker
target/${{ matrix.just_variants }}/release/examples/cdn-marshal
build-arm:
strategy:
Expand All @@ -86,23 +85,25 @@ jobs:
shared-key: ""
prefix-key: arm-${{ matrix.just_variants }}

- name: Build all crates in workspace
run: just ${{ matrix.just_variants }} build
- name: Build examples in release mode
run: just ${{ matrix.just_variants }} build_release --examples --package hotshot-examples --no-default-features --features="docs,doc-images"

- name: Upload Binaries
uses: actions/upload-artifact@v4
with:
name: binaries-aarch64-${{ matrix.just_variants }}
path: |
target/${{ matrix.just_variants }}/debug/examples/counter
target/${{ matrix.just_variants }}/debug/examples/multi-validator-libp2p
target/${{ matrix.just_variants }}/debug/examples/orchestrator-libp2p
target/${{ matrix.just_variants }}/debug/examples/validator-libp2p
target/${{ matrix.just_variants }}/debug/examples/multi-validator-webserver
target/${{ matrix.just_variants }}/debug/examples/multi-webserver
target/${{ matrix.just_variants }}/debug/examples/webserver
target/${{ matrix.just_variants }}/debug/examples/orchestrator-webserver
target/${{ matrix.just_variants }}/debug/examples/validator-webserver
target/${{ matrix.just_variants }}/release/examples/counter
target/${{ matrix.just_variants }}/release/examples/multi-validator-libp2p
target/${{ matrix.just_variants }}/release/examples/orchestrator-libp2p
target/${{ matrix.just_variants }}/release/examples/validator-libp2p
target/${{ matrix.just_variants }}/release/examples/multi-validator-webserver
target/${{ matrix.just_variants }}/release/examples/multi-webserver
target/${{ matrix.just_variants }}/release/examples/webserver
target/${{ matrix.just_variants }}/release/examples/orchestrator-webserver
target/${{ matrix.just_variants }}/release/examples/validator-webserver
target/${{ matrix.just_variants }}/release/examples/cdn-broker
target/${{ matrix.just_variants }}/release/examples/cdn-marshal
build-dockers:
strategy:
Expand Down Expand Up @@ -174,6 +175,20 @@ jobs:
images: ghcr.io/espressosystems/hotshot/validator-webserver
flavor: suffix=-${{ matrix.just_variants }}

- name: Generate cdn-broker docker metadata
uses: docker/metadata-action@v5
id: cdn-broker
with:
images: ghcr.io/espressosystems/hotshot/cdn-broker
flavor: suffix=-${{ matrix.just_variants }}

- name: Generate cdn-marshal docker metadata
uses: docker/metadata-action@v5
id: cdn-marshal
with:
images: ghcr.io/espressosystems/hotshot/cdn-marshal
flavor: suffix=-${{ matrix.just_variants }}

- name: Build and push orchestrator-libp2p docker
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -234,6 +249,30 @@ jobs:
build-args: |
ASYNC_EXECUTOR=${{ matrix.just_variants }}
- name: Build and push cdn-broker docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/cdn-broker.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.cdn-broker.outputs.tags }}
labels: ${{ steps.cdn-broker.outputs.labels }}
build-args: |
ASYNC_EXECUTOR=${{ matrix.just_variants }}
- name: Build and push cdn-marshal docker
uses: docker/build-push-action@v5
with:
context: ./
file: ./docker/cdn-marshal.Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.cdn-marshal.outputs.tags }}
labels: ${{ steps.cdn-marshal.outputs.labels }}
build-args: |
ASYNC_EXECUTOR=${{ matrix.just_variants }}
test-crypto:
strategy:
matrix:
Expand Down
Loading

0 comments on commit 1fd42ac

Please sign in to comment.