Skip to content

Commit

Permalink
Merge pull request #561 from PeggyJV/collin/prepping-for-upgrade
Browse files Browse the repository at this point in the history
Upgrade prep
  • Loading branch information
cbrit authored Oct 8, 2024
2 parents a743749 + 6bdb783 commit 93e4d83
Show file tree
Hide file tree
Showing 35 changed files with 1,630 additions and 510 deletions.
46 changes: 29 additions & 17 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ env:
CARGO_TERM_COLOR: always
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
ORCHESTRATOR_IMAGE_NAME: orchestrator-orchestrator
ORCHESTRATOR_ARTIFACT: orchestrator_orchestrator
UPLOAD_DIR: /tmp/uploaded_artifacts
DOWNLOAD_DIR: /tmp/downloaded_artifacts

jobs:
rust-build:
Expand All @@ -35,29 +39,30 @@ jobs:
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-multi-buildx
- name: Container service login
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
- name: labels
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-orchestrator
- name: Build and push Docker image
images: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
- name: Make upload dir
run: mkdir -p ${{ env.UPLOAD_DIR }}
- name: build
uses: docker/build-push-action@v2
with:
context: ./orchestrator
builder: ${{ steps.buildx.outputs.name }}
context: orchestrator
file: orchestrator/Dockerfile
push: true
platforms: linux/amd64, linux/arm64/v8
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
builder: ${{ steps.buildx.outputs.name }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
outputs: type=docker,dest=${{ env.UPLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
- name: Make Orchestrator artifact available to other jobs
uses: actions/upload-artifact@v3
with:
name: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
path: ${{ env.UPLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
retention-days: 1
- name: Move Docker cache
run: |
rm -rf /tmp/.buildx-cache
Expand Down Expand Up @@ -264,7 +269,7 @@ jobs:
id: meta-orchestrator
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-orchestrator
images: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
- name: docker hardhat metadata
id: meta-hardhat
uses: docker/metadata-action@v3
Expand All @@ -274,8 +279,15 @@ jobs:
run: docker pull ${{ steps.meta-gravity.outputs.tags }}
- name: rename gravity image
run: docker tag ${{ steps.meta-gravity.outputs.tags }} gravity:prebuilt
- name: pull orchestrator image
run: docker pull ${{ steps.meta-orchestrator.outputs.tags }}
- name: Make download dir
run: mkdir -p ${{ env.DOWNLOAD_DIR }}
- name: Get orchestrator artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ORCHESTRATOR_IMAGE_NAME }}
path: ${{ env.DOWNLOAD_DIR }}
- name: Load orchestrator image
run: docker load --input ${{ env.DOWNLOAD_DIR }}/${{ env.ORCHESTRATOR_ARTIFACT }}
- name: rename orchestrator image
run: docker tag ${{ steps.meta-orchestrator.outputs.tags }} orchestrator:prebuilt
- name: pull hardhat image
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
id: rust-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
orchestrator/target/
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
orchestrator/target
key: ${{ runner.os }}-cargo-${{ hashFiles('orchestrator/Cargo.lock') }}
- name: Run Orchestrator unit tests
run: cd orchestrator && cargo test --all --verbose
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ fail:
@false

e2e_happy_path: e2e_clean_slate
E2E_SKIP_CLEANUP=true integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail
E2E_SKIP_CLEANUP=true integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestHappyPath || make -s fail

e2e_valset_update: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValsetUpdate || make -s fail


e2e_validator_out: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestValidatorOut || make -s fail

e2e_transaction_stress: e2e_clean_slate
integration_tests/integration_tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail
integration_tests/integration-tests.test -test.failfast -test.v -test.run IntegrationTestSuite -testify.m TestTransactionStress || make -s fail

Loading

0 comments on commit 93e4d83

Please sign in to comment.