From 0815cf0cddce6f3750a193fb3df966d6e5e9cbf1 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 12 Apr 2022 09:55:49 +0200 Subject: [PATCH 01/12] update GH action workflows --- ...s.yml => docker-build-ethermint-debug.yml} | 22 +--- .../workflows/docker-build-test-ethermint.yml | 112 ++++++++++++++++++ 2 files changed, 118 insertions(+), 16 deletions(-) rename .github/workflows/{build-evmos.yml => docker-build-ethermint-debug.yml} (76%) create mode 100644 .github/workflows/docker-build-test-ethermint.yml diff --git a/.github/workflows/build-evmos.yml b/.github/workflows/docker-build-ethermint-debug.yml similarity index 76% rename from .github/workflows/build-evmos.yml rename to .github/workflows/docker-build-ethermint-debug.yml index c9484716be1..d55bea382f5 100644 --- a/.github/workflows/build-evmos.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -11,11 +11,12 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: celestiaorg/evmos + IMAGE_NAME: celestiaorg/ethermint TAG_PREFIX: optimint- jobs: build: + if: ! github.event.pull_request.head.repo.fork runs-on: "ubuntu-latest" permissions: contents: write @@ -29,21 +30,15 @@ jobs: go-version: 1.17 - name: up a level run: cd .. && pwd - - name: Clone evmos repo - uses: actions/checkout@v3 - with: - repository: jbowen93/evmos - path: evmos - name: Clone ethermint repo uses: actions/checkout@v3 with: repository: celestiaorg/ethermint path: ethermint - ref: v0.11.0+0.1.0 + # ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls - mv evmos .. mv ethermint .. cd .. cp -R optimint ethermint @@ -51,18 +46,13 @@ jobs: rm -rf .git go mod edit -replace=github.com/celestiaorg/optimint=./optimint go mod tidy -compat=1.17 -e - cd .. - cp -R ethermint evmos - cd evmos - go mod edit -replace=github.com/tharsis/ethermint=./ethermint - go mod tidy -compat=1.17 -e - name: Docker meta id: meta uses: docker/metadata-action@v3 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=sha,prefix=${{ env.TAG_PREFIX }} + type=sha,prefix=${{ env.TAG_PREFIX }},suffix=-debug - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx @@ -76,8 +66,8 @@ jobs: - name: Build and push uses: docker/build-push-action@v2 with: - context: ../evmos + context: ../ethermint platforms: linux/amd64, linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} - file: ../evmos/docker/Dockerfile + file: ../ethermint/docker/debug.Dockerfile diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml new file mode 100644 index 00000000000..f8dad1c50ae --- /dev/null +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -0,0 +1,112 @@ +name: build-evmos + +on: + push: + branches: + - main + pull_request: + release: + types: [published] + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: celestiaorg/ethermint + TAG_PREFIX: optimint- + +jobs: + build: + if: ! github.event.pull_request.head.repo.fork + runs-on: "ubuntu-latest" + permissions: + contents: write + packages: write + steps: + - name: "Checkout source code" + uses: "actions/checkout@v3" + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.17 + - name: up a level + run: cd .. && pwd + - name: Clone ethermint repo + uses: actions/checkout@v3 + with: + repository: celestiaorg/ethermint + path: ethermint + ref: v0.11.0+0.1.0 + - name: Move Stuff and Tidy + run: | + ls + mv ethermint .. + cd .. + cp -R optimint ethermint + cd ethermint + rm -rf .git + go mod edit -replace=github.com/celestiaorg/optimint=./optimint + go mod tidy -compat=1.17 -e + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=sha,prefix=${{ env.TAG_PREFIX }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Login to GHCR + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: ../ethermint + platforms: linux/amd64, linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + file: ../ethermint/docker/Dockerfile + + test: + needs: build + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v2 + - name: Clone ephemeral-cluster repo + uses: actions/checkout@v2 + with: + repository: celestiaorg/ephemeral-cluster + path: ephemeral-cluster + ref: ethermint + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - name: "Setup Cluster" + run: | + export EVMOS_IMAGE_TAG=ethermint-$(git rev-parse --short "$GITHUB_SHA") + echo $EVMOS_IMAGE_TAG + cd ephemeral-cluster + scripts/minimal-cevmos.sh + - name: "Test Cluster" + run: | + docker ps -a + echo "------------- docker logs core0 -------------" + docker logs core0 + echo "------------- docker logs bridge0 -------------" + docker logs bridge0 + echo "------------- docker logs light0 -------------" + docker logs light0 + echo "------------- docker logs dalc0 -------------" + docker logs dalc0 + echo "------------- docker logs evmos0 -------------" + docker logs evmos0 + cd /home/runner/work/ethermint/ethermint + echo "------------- go test ./tests/rpc/... -------------" + MODE=rpc HOST=http://127.0.0.1:8545 go test ./tests/rpc/... -v From ef75c807c8edc47cfe160ea46f88e899d70e43b4 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Thu, 14 Apr 2022 17:14:08 +0200 Subject: [PATCH 02/12] fix check for fork --- .github/workflows/docker-build-ethermint-debug.yml | 4 ++-- .github/workflows/docker-build-test-ethermint.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-build-ethermint-debug.yml b/.github/workflows/docker-build-ethermint-debug.yml index d55bea382f5..2107468f5ab 100644 --- a/.github/workflows/docker-build-ethermint-debug.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -16,7 +16,7 @@ env: jobs: build: - if: ! github.event.pull_request.head.repo.fork + if: github.event.pull_request.head.repo.full_name == github.repository runs-on: "ubuntu-latest" permissions: contents: write @@ -35,7 +35,7 @@ jobs: with: repository: celestiaorg/ethermint path: ethermint - # ref: v0.11.0+0.1.0 + ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index f8dad1c50ae..314a4f27b4c 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -16,7 +16,7 @@ env: jobs: build: - if: ! github.event.pull_request.head.repo.fork + if: github.event.pull_request.head.repo.full_name == github.repository runs-on: "ubuntu-latest" permissions: contents: write From edf7f5c0d8bc40d7be18a134fcc452bf618143a0 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Thu, 14 Apr 2022 17:18:15 +0200 Subject: [PATCH 03/12] use newer ethermint --- .github/workflows/docker-build-ethermint-debug.yml | 2 +- .github/workflows/docker-build-test-ethermint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-ethermint-debug.yml b/.github/workflows/docker-build-ethermint-debug.yml index 2107468f5ab..0a2c76aab41 100644 --- a/.github/workflows/docker-build-ethermint-debug.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -35,7 +35,7 @@ jobs: with: repository: celestiaorg/ethermint path: ethermint - ref: v0.11.0+0.1.0 + # ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 314a4f27b4c..94c8043a94c 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -35,7 +35,7 @@ jobs: with: repository: celestiaorg/ethermint path: ethermint - ref: v0.11.0+0.1.0 + # ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls From a78d5e7e84849c73c3e9a0b0d59ba237473b6ed7 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Mon, 25 Apr 2022 11:57:54 +0000 Subject: [PATCH 04/12] use debug package --- .github/workflows/docker-build-ethermint-debug.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-ethermint-debug.yml b/.github/workflows/docker-build-ethermint-debug.yml index 0a2c76aab41..d16f5049edd 100644 --- a/.github/workflows/docker-build-ethermint-debug.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -11,7 +11,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: celestiaorg/ethermint + IMAGE_NAME: celestiaorg/ethermint-debug TAG_PREFIX: optimint- jobs: @@ -52,7 +52,7 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=sha,prefix=${{ env.TAG_PREFIX }},suffix=-debug + type=sha,prefix=${{ env.TAG_PREFIX }} - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx From b2aa60037df2c017fb62203482bf056c8d823266 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 07:37:23 +0000 Subject: [PATCH 05/12] rename jobs --- .github/workflows/docker-build-ethermint-debug.yml | 2 +- .github/workflows/docker-build-test-ethermint.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-ethermint-debug.yml b/.github/workflows/docker-build-ethermint-debug.yml index d16f5049edd..2a45c37c172 100644 --- a/.github/workflows/docker-build-ethermint-debug.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -1,4 +1,4 @@ -name: build-evmos +name: docker-build-ethermint-debug on: push: diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 94c8043a94c..e9b1d9c378f 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -1,4 +1,4 @@ -name: build-evmos +name: docker-build-test-ethermint on: push: From 290d9b58fae99e6488ce505cfc0c45d73bc186ca Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 08:01:16 +0000 Subject: [PATCH 06/12] use main branch of ephemeral-cluster --- .github/workflows/docker-build-ethermint-debug.yml | 1 - .github/workflows/docker-build-test-ethermint.yml | 2 -- 2 files changed, 3 deletions(-) diff --git a/.github/workflows/docker-build-ethermint-debug.yml b/.github/workflows/docker-build-ethermint-debug.yml index 2a45c37c172..41645a7c8ea 100644 --- a/.github/workflows/docker-build-ethermint-debug.yml +++ b/.github/workflows/docker-build-ethermint-debug.yml @@ -35,7 +35,6 @@ jobs: with: repository: celestiaorg/ethermint path: ethermint - # ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index e9b1d9c378f..27c9c044582 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -35,7 +35,6 @@ jobs: with: repository: celestiaorg/ethermint path: ethermint - # ref: v0.11.0+0.1.0 - name: Move Stuff and Tidy run: | ls @@ -83,7 +82,6 @@ jobs: with: repository: celestiaorg/ephemeral-cluster path: ephemeral-cluster - ref: ethermint - name: Set up Go uses: actions/setup-go@v2 with: From f389118b278a911ef0ae69228c6c8a4a77a8f6c2 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 08:11:22 +0000 Subject: [PATCH 07/12] fix to use new script names --- .github/workflows/docker-build-test-ethermint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 27c9c044582..4c142aef485 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -91,7 +91,7 @@ jobs: export EVMOS_IMAGE_TAG=ethermint-$(git rev-parse --short "$GITHUB_SHA") echo $EVMOS_IMAGE_TAG cd ephemeral-cluster - scripts/minimal-cevmos.sh + scripts/minimal-ethermint.sh - name: "Test Cluster" run: | docker ps -a From fd269b6e16146ed253df8db8593fa6ff02a54584 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 08:25:21 +0000 Subject: [PATCH 08/12] fix tags for testing --- .github/workflows/docker-build-test-ethermint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 4c142aef485..5e430aa5b94 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -88,8 +88,8 @@ jobs: go-version: 1.17 - name: "Setup Cluster" run: | - export EVMOS_IMAGE_TAG=ethermint-$(git rev-parse --short "$GITHUB_SHA") - echo $EVMOS_IMAGE_TAG + export ETHERMINT_IMAGE_TAG=optimint-$(git rev-parse --short "$GITHUB_SHA") + echo $ETHERMINT_IMAGE_TAG cd ephemeral-cluster scripts/minimal-ethermint.sh - name: "Test Cluster" From 3b712fdf926fa199d46c656f948d5bb96f11f338 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 09:08:15 +0000 Subject: [PATCH 09/12] fix typo --- .github/workflows/docker-build-test-ethermint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 5e430aa5b94..d98b0b757e1 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -104,7 +104,7 @@ jobs: echo "------------- docker logs dalc0 -------------" docker logs dalc0 echo "------------- docker logs evmos0 -------------" - docker logs evmos0 + docker logs ethermint0 cd /home/runner/work/ethermint/ethermint echo "------------- go test ./tests/rpc/... -------------" MODE=rpc HOST=http://127.0.0.1:8545 go test ./tests/rpc/... -v From 465b1eaffce192cea196b725829cd9775ab8fb73 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 09:42:37 +0000 Subject: [PATCH 10/12] fix typo --- .github/workflows/docker-build-test-ethermint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index d98b0b757e1..b7e98ac7346 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -105,6 +105,6 @@ jobs: docker logs dalc0 echo "------------- docker logs evmos0 -------------" docker logs ethermint0 - cd /home/runner/work/ethermint/ethermint + cd /home/runner/work/optimint/ethermint echo "------------- go test ./tests/rpc/... -------------" MODE=rpc HOST=http://127.0.0.1:8545 go test ./tests/rpc/... -v From 365b8c1fe012382587eb4a8d79a1126a894c63b8 Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Tue, 26 Apr 2022 09:52:49 +0000 Subject: [PATCH 11/12] add ethermint repo --- .github/workflows/docker-build-test-ethermint.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index b7e98ac7346..0961a091f5a 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -82,6 +82,11 @@ jobs: with: repository: celestiaorg/ephemeral-cluster path: ephemeral-cluster + - name: Clone ethermint repo + uses: actions/checkout@v3 + with: + repository: celestiaorg/ethermint + path: ethermint - name: Set up Go uses: actions/setup-go@v2 with: @@ -92,6 +97,7 @@ jobs: echo $ETHERMINT_IMAGE_TAG cd ephemeral-cluster scripts/minimal-ethermint.sh + cd .. - name: "Test Cluster" run: | docker ps -a @@ -105,6 +111,6 @@ jobs: docker logs dalc0 echo "------------- docker logs evmos0 -------------" docker logs ethermint0 - cd /home/runner/work/optimint/ethermint + cd ethermint echo "------------- go test ./tests/rpc/... -------------" MODE=rpc HOST=http://127.0.0.1:8545 go test ./tests/rpc/... -v From 3ccd76e1a37871979978ecc747228130d28ae84d Mon Sep 17 00:00:00 2001 From: Josh Bowen Date: Fri, 29 Apr 2022 12:03:21 +0000 Subject: [PATCH 12/12] fix nit --- .github/workflows/docker-build-test-ethermint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-build-test-ethermint.yml b/.github/workflows/docker-build-test-ethermint.yml index 0961a091f5a..2171e276343 100644 --- a/.github/workflows/docker-build-test-ethermint.yml +++ b/.github/workflows/docker-build-test-ethermint.yml @@ -29,7 +29,9 @@ jobs: with: go-version: 1.17 - name: up a level - run: cd .. && pwd + run: | + cd .. + pwd - name: Clone ethermint repo uses: actions/checkout@v3 with: