Skip to content

Commit

Permalink
Amend CI testing to not build on arm, correctly cross compile on arm6…
Browse files Browse the repository at this point in the history
…4. (#4065)
  • Loading branch information
DimitrisJim authored Jul 13, 2023
1 parent 74edc51 commit 60d9475
Showing 1 changed file with 10 additions and 3 deletions.
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']
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
- 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

0 comments on commit 60d9475

Please sign in to comment.