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

Amend CI testing to not build on arm, correctly cross compile on arm64. #4065

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ['amd64', 'arm', 'arm64']
go-arch: ['amd64', 'arm64']
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reasoning: https://github.com/CosmWasm/wasmvm#builds-of-libwasmvm

Our system currently supports the following builds. In general we can only support targets that are supported by Wasmer's singlepass backend, which for example excludes all 32 bit systems.

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand All @@ -49,15 +49,22 @@ jobs:
**/**.go
go.mod
go.sum
# Install cross compiler for ARM64. Export CC env variable.
- name: Install compiler for arm64.
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
if: matrix.go-arch == 'arm64'
- name: Build ibc-go
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
run: GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 LEDGER_ENABLED=false make build
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CGO_ENABLED is, by default, disabled if targeting an arch different than native.

- name: Build e2e
run: |
cd e2e
find ./tests -type d | while IFS= read -r dir
do
if ls "${dir}"/*.go >/dev/null 2>&1; then
GOARCH=${{ matrix.go-arch }} go test -c "$dir"
GOARCH=${{ matrix.go-arch }} CGO_ENABLED=1 go test -c "$dir"
fi
done

Expand Down