fix(go-build-alpine): honour OONI_PSIPHON_TAGS (#968)

Closes https://github.com/ooni/probe/issues/2334.

While there, reinstate integration tests, which were also lost in a previous refactoring. However, only run those tests for linux/amd64 because we can be confident that the Go compiler is WAI for all archs we support.

While there, always use bash for running end-to-end tests.

H/T @ainghazal for discovering and reporting this bug.
This commit is contained in:
Simone Basso 2022-10-03 11:55:47 +02:00 committed by GitHub
commit 89a584f93b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 57 additions and 31 deletions

View file

@ -8,9 +8,11 @@ export GOCACHE=$GOCACHE
export GOMODCACHE=$GOMODCACHE
export GOOS=$GOOS
export GOARCH=$GOARCH
export OONI_PSIPHON_TAGS=${OONI_PSIPHON_TAGS:-}
for PACKAGE in $@; do
PRODUCT=$(basename $PACKAGE)
go build -o ./CLI/$PRODUCT-$GOOS-$OONIARCH \
-tags=$OONI_PSIPHON_TAGS \
-ldflags='-s -w -extldflags "-static"' \
$GOLANG_EXTRA_FLAGS $PACKAGE
done