From e33f913fd902cf56c7097a9dce42df55472c4683 Mon Sep 17 00:00:00 2001 From: DimitrisJim Date: Tue, 11 Jul 2023 22:26:38 +0300 Subject: [PATCH] Amend CI testing to not build on arm, correctly cross compile on arm64. --- .github/workflows/test.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65c13842bb6..6ecb7b4c515 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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