Skip to content

Commit 90ebc89

Browse files
committed
Fix CI build failures
- macOS: Use macos-15 (arm64); sed-patch Makefile to replace -lcrypto with static libcrypto.a path (Makefile uses LDFLAGS +=, not overridable via command line). Single arm64 binary serves both darwin-arm64 and darwin-x64 (Rosetta handles x64). - Linux: Add openssl-libs-static to apk for libcrypto.a; same sed patch for static archive path. - Drop macos-13 (removed from GitHub Actions Dec 2025). No free x64 macOS runners exist; all standard-tier runners are arm64.
1 parent f6cfcb5 commit 90ebc89

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ jobs:
2626
strategy:
2727
matrix:
2828
include:
29-
- target: darwin-arm64
30-
os: macos-14
31-
- target: darwin-x64
32-
os: macos-13
29+
- target: darwin
30+
os: macos-15
3331
- target: linux-x64
3432
os: ubuntu-latest
3533
platform: linux/amd64
@@ -58,7 +56,10 @@ jobs:
5856
brew install openssl@3
5957
OPENSSL_DIR="$(brew --prefix openssl@3)"
6058
cd "git-crypt-${{ steps.version.outputs.version }}"
61-
make CXXFLAGS="-O2 -Wall -I${OPENSSL_DIR}/include" LDLIBS="${OPENSSL_DIR}/lib/libcrypto.a"
59+
# Makefile uses LDFLAGS += -lcrypto (not overridable via command line).
60+
# Patch to link the static archive directly instead.
61+
sed -i '' "s|-lcrypto|${OPENSSL_DIR}/lib/libcrypto.a|" Makefile
62+
make CXXFLAGS="-O2 -Wall -I${OPENSSL_DIR}/include"
6263
strip git-crypt
6364
mkdir -p ../bin
6465
cp git-crypt ../bin/
@@ -72,8 +73,9 @@ jobs:
7273
run: |
7374
docker run --rm --platform "${{ matrix.platform }}" \
7475
-v "$PWD:/build" -w /build alpine sh -c "
75-
apk add g++ make musl-dev openssl-dev file &&
76+
apk add g++ make musl-dev openssl-dev openssl-libs-static file &&
7677
cd git-crypt-${{ steps.version.outputs.version }} &&
78+
sed -i 's|-lcrypto|/usr/lib/libcrypto.a|' Makefile &&
7779
LDFLAGS='-static' make &&
7880
strip git-crypt &&
7981
./git-crypt --version &&
@@ -132,7 +134,12 @@ jobs:
132134
run: |
133135
for target in darwin-arm64 darwin-x64 linux-x64 linux-arm64; do
134136
mkdir -p bin
135-
cp "artifacts/git-crypt-${target}/git-crypt" bin/git-crypt
137+
# Both darwin targets use the same arm64 binary (Rosetta handles x64)
138+
case "$target" in
139+
darwin-*) ARTIFACT="darwin" ;;
140+
*) ARTIFACT="$target" ;;
141+
esac
142+
cp "artifacts/git-crypt-${ARTIFACT}/git-crypt" bin/git-crypt
136143
chmod +x bin/git-crypt
137144
npx vsce package --target "$target"
138145
rm -rf bin

0 commit comments

Comments
 (0)