Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manually triggerable Action to build simd Docker image #2001

Merged
merged 13 commits into from
Aug 15, 2022
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
chatton marked this conversation as resolved.
Show resolved Hide resolved

#### Building and bushing a simd image.
chatton marked this conversation as resolved.
Show resolved Hide resolved

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.
chatton marked this conversation as resolved.
Show resolved Hide resolved

Thie can be triggered manually from the UI by navigating to
chatton marked this conversation as resolved.
Show resolved Hide resolved

`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.
chatton marked this conversation as resolved.
Show resolved Hide resolved

```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