Skip to content

Commit 5ea1d6d

Browse files
committed
fix: use macos-13 runner for x86_64 build and add arch verification
macos-14 and macos-latest runners on GitHub Actions are Apple Silicon (arm64). For Intel (x86_64) builds, macos-13 is required. This caused filterGenerator-macos-x86_64.dmg to silently contain an arm64 binary, making it unrunnable on Intel Macs. Also add explicit architecture verification steps to both macOS jobs so any future runner/architecture mismatch will fail loudly with a clear error.
1 parent 7e5746d commit 5ea1d6d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/macos-build.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ jobs:
6363
- name: Build
6464
run: cmake --build build --config Release -j$(sysctl -n hw.logicalcpu)
6565

66+
- name: Verify architecture (arm64)
67+
run: |
68+
ARCH=$(lipo -info build/filterGenerator/filterGenerator.app/Contents/MacOS/filterGenerator | grep -o 'arm64\|x86_64' | tail -1)
69+
echo "Binary architecture: $ARCH"
70+
if [ "$ARCH" != "arm64" ]; then
71+
echo "ERROR: Expected arm64 but got $ARCH"
72+
exit 1
73+
fi
74+
6675
- name: Deploy Qt dependencies
6776
run: |
6877
macdeployqt build/filterGenerator/filterGenerator.app -verbose=1
@@ -92,7 +101,7 @@ jobs:
92101

93102
build-mac-x86_64:
94103
name: macOS x86_64 (Intel)
95-
runs-on: macos-14
104+
runs-on: macos-13
96105
outputs:
97106
artifact-name: ${{ steps.set-artifact.outputs.name }}
98107

@@ -125,6 +134,15 @@ jobs:
125134
- name: Build
126135
run: cmake --build build --config Release -j$(sysctl -n hw.logicalcpu)
127136

137+
- name: Verify architecture (x86_64)
138+
run: |
139+
ARCH=$(lipo -info build/filterGenerator/filterGenerator.app/Contents/MacOS/filterGenerator | grep -o 'arm64\|x86_64' | tail -1)
140+
echo "Binary architecture: $ARCH"
141+
if [ "$ARCH" != "x86_64" ]; then
142+
echo "ERROR: Expected x86_64 but got $ARCH"
143+
exit 1
144+
fi
145+
128146
- name: Deploy Qt dependencies
129147
run: |
130148
macdeployqt build/filterGenerator/filterGenerator.app -verbose=1

0 commit comments

Comments
 (0)