Skip to content

Commit ffcf994

Browse files
wesmclaude
andcommitted
Fix Linux and macOS builds: container VCS error and deprecated runner
- Add -buildvcs=false for Linux container builds (git safe.directory issue in Rocky Linux container) - Replace deprecated macos-13 with macos-15 (cross-compile amd64 from arm64, Apple's clang handles this natively) - Skip smoke test for cross-compiled Darwin amd64 binary Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a3664cc commit ffcf994

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
mkdir -p dist
5252
LDFLAGS="-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION}"
53-
go build -tags fts5 -trimpath -ldflags="$LDFLAGS" -o dist/msgvault ./cmd/msgvault
53+
go build -tags fts5 -trimpath -buildvcs=false -ldflags="$LDFLAGS" -o dist/msgvault ./cmd/msgvault
5454
5555
echo "--- Binary info ---"
5656
file dist/msgvault
@@ -81,9 +81,9 @@ jobs:
8181
matrix:
8282
include:
8383
- goarch: amd64
84-
runner: macos-13
84+
runner: macos-15
8585
- goarch: arm64
86-
runner: macos-14
86+
runner: macos-15
8787
runs-on: ${{ matrix.runner }}
8888

8989
steps:
@@ -105,6 +105,9 @@ jobs:
105105
LDFLAGS="-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION}"
106106
go build -tags fts5 -trimpath -ldflags="$LDFLAGS" -o dist/msgvault ./cmd/msgvault
107107
108+
echo "--- Binary info ---"
109+
file dist/msgvault
110+
108111
# Verify no libstdc++ dependency (macOS should only link libc++ and system libs)
109112
echo "--- Dynamic libraries ---"
110113
otool -L dist/msgvault
@@ -113,11 +116,16 @@ jobs:
113116
exit 1
114117
fi
115118
116-
# Smoke test — verify binary runs and reports correct version
117-
echo "--- Smoke test ---"
118-
SMOKE_OUT=$(dist/msgvault version 2>&1)
119-
echo "$SMOKE_OUT"
120-
echo "$SMOKE_OUT" | grep -q "v${VERSION}" || { echo "FATAL: version output doesn't match tag"; exit 1; }
119+
# Smoke test — only for native arch (amd64 is cross-compiled from arm64)
120+
NATIVE_ARCH=$(uname -m)
121+
if [ "${{ matrix.goarch }}" = "arm64" ] && [ "$NATIVE_ARCH" = "arm64" ]; then
122+
echo "--- Smoke test ---"
123+
SMOKE_OUT=$(dist/msgvault version 2>&1)
124+
echo "$SMOKE_OUT"
125+
echo "$SMOKE_OUT" | grep -q "v${VERSION}" || { echo "FATAL: version output doesn't match tag"; exit 1; }
126+
else
127+
echo "--- Smoke test skipped (cross-compiled) ---"
128+
fi
121129
122130
cd dist
123131
ARCHIVE="msgvault_${VERSION}_darwin_${{ matrix.goarch }}.tar.gz"

0 commit comments

Comments
 (0)