diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml deleted file mode 100644 index d3717d2c35a..00000000000 --- a/.github/workflows/e2e-fork.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Tests / E2E Fork -on: - workflow_dispatch: - pull_request: - branches: - - main - paths-ignore: - - docs/** - -jobs: - # dynamically build a matrix of test/test suite pairs to run - build-test-matrix: - if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - id: set-matrix - run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" - - e2e: - env: - SIMD_TAG: latest - SIMD_IMAGE: ibc-go-simd-e2e - if: ${{ github.event.pull_request.head.repo.fork || github.actor == 'dependabot[bot]' || github.event_name == 'workflow_dispatch' }} - needs: - - build-test-matrix - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }} - steps: - - uses: actions/checkout@v3 - - name: Docker Build - run: docker build . -t "${SIMD_IMAGE}:${SIMD_TAG}" - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - name: Run e2e Test - env: - # see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions - RLY_TAG: "v2.0.0-rc2" - run: | - cd e2e - make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }} diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml deleted file mode 100644 index ae4d29e7b51..00000000000 --- a/.github/workflows/e2e.yaml +++ /dev/null @@ -1,105 +0,0 @@ -name: Tests / E2E -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - paths-ignore: - - docs/** - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ibc-go-simd-e2e - -jobs: - docker-build: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Log in to the Container registry - uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a - with: - images: ${{ env.REGISTRY }}/cosmos/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image - uses: docker/build-push-action@1cb9d22b932e4832bb29793b7777ec860fc1cde0 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - # dynamically build a matrix of test/test suite pairs to run - build-test-matrix: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.set-matrix.outputs.matrix }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - id: set-matrix - run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" - - - # the tag of the image will differ if this is a PR or the branch is being merged into main. - # we store the tag as an environment variable and use it in the E2E tests to determine the tag. - determine-image-tag: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest - outputs: - simd-tag: ${{ steps.get-tag.outputs.simd-tag }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - id: get-tag - run: | - tag=$(go run cmd/determine_simd_tag/main.go -pr "${{ github.event.pull_request.number }}" ) - echo "Using tag $tag" - echo "::set-output name=simd-tag::$tag" - - - e2e: - if: ${{ !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }} - runs-on: ubuntu-latest - needs: - - build-test-matrix - - determine-image-tag - - docker-build - env: - SIMD_TAG: ${{ needs.determine-image-tag.outputs.simd-tag }} - SIMD_IMAGE: ghcr.io/cosmos/ibc-go-simd-e2e - # see images here https://github.com/cosmos/relayer/pkgs/container/relayer/versions - RLY_TAG: "v2.0.0-rc2" - strategy: - fail-fast: false - matrix: ${{ fromJSON(needs.build-test-matrix.outputs.matrix) }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 - with: - go-version: 1.18 - - name: Log in to the Container registry - uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Run e2e Test - run: | - cd e2e - make e2e-test suite=${{ matrix.suite }} test=${{ matrix.test }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 06b11e26d46..f97fb99f439 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,4 +51,5 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + build-args: | + IBC_GO_VERSION=${{ github.ref_name }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dabb6af1178..c693b6a1a14 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -52,6 +52,13 @@ jobs: - name: Build run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build + docker-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Docker Build + run: docker build . --no-cache --build-arg IBC_GO_VERSION=v5.2.0 + split-test-files: runs-on: ubuntu-latest steps: diff --git a/Dockerfile b/Dockerfile index a193f54906e..95d59ee9616 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,13 @@ -FROM golang:1.18 as builder +FROM golang:1.19 as builder + +ARG IBC_GO_VERSION ENV GOPATH="" ENV GOMODULE="on" +# ensure the ibc go version is being specified for this image. +RUN test -n "${IBC_GO_VERSION}" + COPY go.mod . COPY go.sum . @@ -18,6 +23,10 @@ RUN make build FROM ubuntu:20.04 +ARG IBC_GO_VERSION + +LABEL "org.cosmos.ibc-go" "${IBC_GO_VERSION}" + COPY --from=builder /go/build/simd /bin/simd ENTRYPOINT ["simd"]