Skip to content

Commit

Permalink
Add manually triggerable Action to build simd Docker image (cosmos#2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
chatton authored Aug 15, 2022
1 parent 8201ef9 commit 727f0d3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/build-simd-image-from-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Simd Image
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag of the image to build'
required: true
type: string

env:
REGISTRY: ghcr.io
ORG: cosmos
IMAGE_NAME: ibc-go-simd
VERSION: "${{ inputs.tag }}"

jobs:
build-image-at-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: "${{ env.VERSION }}"
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch latest Dockerfile
run: curl https://raw.githubusercontent.com/cosmos/ibc-go/main/Dockerfile -o Dockerfile
- name: Build image
run: |
docker build . -t "${REGISTRY}/${ORG}/${IMAGE_NAME}:${VERSION}"
docker push "${REGISTRY}/${ORG}/${IMAGE_NAME}:${VERSION}"
22 changes: 21 additions & 1 deletion e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
2. [Test design](#test-design)
- a. [ibctest](#ibctest)
- b. [CI configuration](#ci-configuration)
3. [Troubleshooting](#troubleshooting)
3. [Github Workflows](#github-workflows)
4. [Troubleshooting](#troubleshooting)


## How to write tests
Expand Down Expand Up @@ -308,6 +309,25 @@ All tests will be run on different hosts.
* Gas fees are set to zero to simply calcuations when asserting account balances.
* When upgrading from e.g. v4 -> v5, in ibc-go, we cannot upgrade the go.mod under `e2e` since v5 will not yet exist. We need to upgrade it in a follow up PR.


### GitHub Workflows

#### Building and pushing a `simd` image.

If we ever need to manually build and push an image, we can do so with the [Build Simd Image](../.github/workflows/build-simd-image-from-tag.yml) GitHub workflow.

This can be triggered manually from the UI by navigating to

`Actions` -> `Build Simd Image` -> `Run Workflow`

And providing the git tag.

Alternatively, the [gh](https://cli.github.com/) CLI tool can be used to trigger this workflow.

```bash
gh workflow run "Build Simd Image" -f tag=v3.0.0
```

### Troubleshooting

* On Mac, after running a lot of tests, it can happen that containers start failing. To fix this, you can try clearing existing containers and restarting the docker daemon.
Expand Down

0 comments on commit 727f0d3

Please sign in to comment.