From 37632f60d98bcf5d02e45179c77b31a5581d7669 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 29 Aug 2022 00:48:46 +0200 Subject: [PATCH] fix: repair releasing miniooni and ooniprobe-windows (#900) It seems several CI builds failed for [v3.16.0-alpha](https://github.com/ooni/probe-cli/releases/tag/v3.16.0-alpha). Let's aim to repair miniooni and ooniprobe-windows for now. The other failing builds seem more tricky. (Android fails with an unsupported NDK while Linux fails with issues accessing the git repository from Docker, probably because the the user running inside Docker is not the user that owns the repository.) --- .github/workflows/miniooni.yml | 26 ++++++++++++++++++++++++++ CLI/check-mingw-w64-version | 2 +- CLI/go-build-cross | 7 ++++++- CLI/go-build-windows | 2 +- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/.github/workflows/miniooni.yml b/.github/workflows/miniooni.yml index b6e4f1c..fe3acb9 100644 --- a/.github/workflows/miniooni.yml +++ b/.github/workflows/miniooni.yml @@ -41,6 +41,16 @@ jobs: - run: make ./CLI/miniooni - run: ./E2E/miniooni.bash ./CLI/miniooni-linux-amd64 + - uses: actions/upload-artifact@v1 + with: + name: miniooni-darwin-amd64 + path: ./CLI/miniooni-darwin-amd64 + + - uses: actions/upload-artifact@v1 + with: + name: miniooni-darwin-arm64 + path: ./CLI/miniooni-darwin-arm64 + - uses: actions/upload-artifact@v1 with: name: miniooni-linux-386 @@ -51,6 +61,11 @@ jobs: name: miniooni-linux-amd64 path: ./CLI/miniooni-linux-amd64 + - uses: actions/upload-artifact@v1 + with: + name: miniooni-linux-armv6 + path: ./CLI/miniooni-linux-armv6 + - uses: actions/upload-artifact@v1 with: name: miniooni-linux-armv7 @@ -61,6 +76,16 @@ jobs: name: miniooni-linux-arm64 path: ./CLI/miniooni-linux-arm64 + - uses: actions/upload-artifact@v1 + with: + name: miniooni-windows-386.exe + path: ./CLI/miniooni-windows-386.exe + + - uses: actions/upload-artifact@v1 + with: + name: miniooni-windows-amd64.exe + path: ./CLI/miniooni-windows-amd64.exe + - run: | tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g') gh release create -p $tag --target $GITHUB_SHA || true @@ -68,6 +93,7 @@ jobs: ./CLI/miniooni-darwin-arm64 \ ./CLI/miniooni-linux-386 \ ./CLI/miniooni-linux-amd64 \ + ./CLI/miniooni-linux-armv6 \ ./CLI/miniooni-linux-armv7 \ ./CLI/miniooni-linux-arm64 \ ./CLI/miniooni-windows-386.exe \ diff --git a/CLI/check-mingw-w64-version b/CLI/check-mingw-w64-version index 4a40f2f..3768714 100755 --- a/CLI/check-mingw-w64-version +++ b/CLI/check-mingw-w64-version @@ -2,7 +2,7 @@ set -euo pipefail -EXPECTED_MINGW_W64_VERSION=${EXPECTED_MINGW_W64_VERSION:-12.1.0} # Allow overriding +EXPECTED_MINGW_W64_VERSION=${EXPECTED_MINGW_W64_VERSION:-12.2.0} # Allow overriding printf "checking for x86_64-w64-mingw32-gcc... " command -v x86_64-w64-mingw32-gcc || { diff --git a/CLI/go-build-cross b/CLI/go-build-cross index d9c0f81..e7713b5 100755 --- a/CLI/go-build-cross +++ b/CLI/go-build-cross @@ -47,6 +47,11 @@ else OONI_PSIPHON_TAGS="" fi +EXT= +if [[ $GOOS == "windows" ]]; then + EXT=.exe +fi + PRODUCT=$(basename $PACKAGE) set -x @@ -55,5 +60,5 @@ export GOOS=$GOOS export GOARCH=$GOARCH export GOARM=$GOARM go build -tags=$OONI_PSIPHON_TAGS -ldflags="-s -w" \ - -o ./CLI/$PRODUCT-$GOOS-$OONIARCH ${GOLANG_EXTRA_FLAGS:-} \ + -o ./CLI/$PRODUCT-$GOOS-$OONIARCH$EXT ${GOLANG_EXTRA_FLAGS:-} \ $PACKAGE diff --git a/CLI/go-build-windows b/CLI/go-build-windows index 8f7f15d..09f63ab 100755 --- a/CLI/go-build-windows +++ b/CLI/go-build-windows @@ -51,5 +51,5 @@ export CGO_ENABLED=1 export GOOS=$GOOS export GOARCH=$GOARCH go build -tags=$OONI_PSIPHON_TAGS -ldflags="-s -w" \ - -o ./CLI/$PRODUCT-$GOOS-$GOARCH ${GOLANG_EXTRA_FLAGS:-} \ + -o ./CLI/$PRODUCT-$GOOS-$GOARCH.exe ${GOLANG_EXTRA_FLAGS:-} \ $PACKAGE