Skip to content

Commit

Permalink
build: Be more subtle about cross compilation errors
Browse files Browse the repository at this point in the history
Summarize platforms that fail to build, without overloading the build
log with errors that we anyway ignore. (Currently freebsd/riscv64 fails
to build.)
  • Loading branch information
calmh committed Sep 1, 2023
1 parent 29056d5 commit 4bf9823
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build-syncthing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,18 @@ jobs:
| grep -v /wasm \
)
# Build for each platform with errors silenced, because we expect
# some oddball platforms to fail. This avoids a bunch of errors in
# the GitHub Actions output, instead summarizing each build
# failure as a warning.
for plat in $platforms; do
goos="${plat%/*}"
goarch="${plat#*/}"
if ! go run build.go -goos "$goos" -goarch "$goarch" tar ; then
echo "*** $plat failed ***"
echo "::group ::$plat"
if ! go run build.go -goos "$goos" -goarch "$goarch" tar 2>/dev/null; then
echo "::warning ::Failed to build for $plat"
fi
echo "::endgroup::"
done
env:
CGO_ENABLED: "0"
Expand Down

0 comments on commit 4bf9823

Please sign in to comment.