Skip to content

Commit

Permalink
Merge pull request #182 from crazy-max/fix-go-ubuntu-22.04
Browse files Browse the repository at this point in the history
test: skip mips go build on ubuntu 22.04
tonistiigi authored Dec 9, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
2 parents 32b3295 + 65f8df0 commit e8a4060
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test-go.bats
Original file line number Diff line number Diff line change
@@ -307,23 +307,35 @@ testHelloGO() {
}

@test "mipsle-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mipsle
testHelloGO
}

@test "mipsle-softfloat-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mipsle
export TARGETVARIANT=softfloat
testHelloGO
unset TARGETVARIANT
}

@test "mips64le-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mips64le
testHelloGO
}

@test "mips64le-softfloat-hellogo" {
if ! supportMipsBuildGo; then
skip "MIPS build not supported"
fi
export TARGETARCH=mips64le
export TARGETVARIANT=softfloat
testHelloGO
6 changes: 6 additions & 0 deletions src/test_helper.bash
Original file line number Diff line number Diff line change
@@ -95,6 +95,12 @@ supportAmd64VariantGo() {
versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.18"
}

# Supported since Go 1.13: https://go.dev/wiki/GoMips
# But fails on Ubuntu 22.04 with Go 1.18.1: https://github.com/tonistiigi/xx/issues/177
supportMipsBuildGo() {
! grep -q 'ID=ubuntu' /etc/os-release && ! grep -q 'VERSION_ID="22.04"' /etc/os-release && versionGTE "$(go version | awk '{print $3}' | sed 's/^go//')" "1.13"
}

supportRC() {
command -v llvm-rc >/dev/null 2>&1
}

0 comments on commit e8a4060

Please sign in to comment.