Skip to content

Commit a8641c3

Browse files
authored
Refactor macOS deployment workflow
Updated deployment workflow for macOS to remove DMG creation and add DMG packaging step with signing.
1 parent 734767f commit a8641c3

1 file changed

Lines changed: 19 additions & 40 deletions

File tree

.github/workflows/deploy-macos.yml

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ macos-14 ] # arm64 runner by default
18+
os: [ macos-14 ]
1919
conda_platform: [ osx-arm64 ]
2020
artifact_name: [ gemsgui-macos ]
2121

@@ -78,7 +78,6 @@ jobs:
7878
ninja
7979
ninja install
8080
81-
8281
# -------------------------
8382
# Post-install adjustments
8483
# -------------------------
@@ -92,22 +91,13 @@ jobs:
9291
- name: Install timeout tool
9392
run: brew install coreutils
9493

95-
# -------------------------
94+
# -------------------------
9695
# Verify architecture + smoke test GUI app
9796
# -------------------------
9897
- name: Verify runner architecture
9998
run: |
10099
echo "uname -m:"
101100
uname -m
102-
echo "RUNNER_ARCH:"
103-
echo "$RUNNER_ARCH"
104-
echo "CPU brand:"
105-
sysctl -n machdep.cpu.brand_string
106-
107-
echo "Compiler target:"
108-
clang -v 2>&1 | grep Target
109-
110-
echo "If uname -m != arm64, fail."
111101
if [ "$(uname -m)" != "arm64" ]; then
112102
echo "ERROR: Not running on ARM64 runner"
113103
exit 1
@@ -116,55 +106,45 @@ jobs:
116106
- name: Smoke test GEMSGUI
117107
run: |
118108
APP="${{ steps.strings2.outputs.deploy-output-dir }}/gem-selektor.app/Contents/MacOS/gem-selektor"
119-
120-
echo "Running smoke test with timeout:"
121109
set +e
122110
gtimeout 10 "$APP" -u "$HOME/gems-user-dir"
123111
EXIT_CODE=$?
124112
set -e
125-
126-
if [ "$EXIT_CODE" -eq 0 ]; then
127-
echo "App exited normally (rare but OK)"
128-
elif [ "$EXIT_CODE" -eq 124 ]; then
129-
echo "App timed out (expected for GUI) — smoke test passed"
130-
else
113+
if [ "$EXIT_CODE" -ne 124 ] && [ "$EXIT_CODE" -ne 0 ]; then
131114
echo "App crashed with exit code $EXIT_CODE"
132115
exit 1
133116
fi
134117
135-
echo "Smoke test passed"
136-
137118
# -------------------------
138-
# DMG packaging (system Qt)
119+
# macdeployqt (NO DMG)
139120
# -------------------------
140-
- name: Clean previous DMG
141-
run: |
142-
hdiutil detach /Volumes/gem-selektor || true
143-
rm -f gem-selektor.dmg
144-
145-
- name: Create DMG with macdeployqt
121+
- name: Run macdeployqt (no DMG)
146122
shell: bash -l {0}
147123
run: |
148124
conda activate GEMSGUI
149125
cd "${{ steps.strings2.outputs.deploy-output-dir }}"
150-
/Users/runner/miniconda3/envs/GEMSGUI/lib/qt6/bin/macdeployqt gem-selektor.app -verbose=2 -dmg
151-
mv gem-selektor.dmg "${{ github.workspace }}/macos-${{ steps.strings.outputs.deploy-name }}.dmg"
152-
126+
/Users/runner/miniconda3/envs/GEMSGUI/lib/qt6/bin/macdeployqt gem-selektor.app -verbose=2
153127
128+
# -------------------------
129+
# Ad-hoc signing
130+
# -------------------------
154131
- name: Ad-hoc sign .app bundle
155132
run: |
156133
cd "${{ steps.strings2.outputs.deploy-output-dir }}"
157-
158-
echo "Removing quarantine flags..."
159134
xattr -dr com.apple.quarantine gem-selektor.app || true
160-
161-
echo "Ad-hoc signing bundle..."
162135
codesign --force --deep --sign - gem-selektor.app
163-
164-
echo "Verifying signature..."
165136
codesign --verify --deep --strict gem-selektor.app
166-
spctl --assess --verbose gem-selektor.app || true
167137
138+
# -------------------------
139+
# Create DMG (signed app inside)
140+
# -------------------------
141+
- name: Create DMG
142+
run: |
143+
cd "${{ steps.strings2.outputs.deploy-output-dir }}"
144+
hdiutil create -volname gem-selektor \
145+
-srcfolder gem-selektor.app \
146+
-ov -format UDZO gem-selektor.dmg
147+
mv gem-selektor.dmg "${{ github.workspace }}/macos-${{ steps.strings.outputs.deploy-name }}.dmg"
168148
169149
# -------------------------
170150
# ZIP packaging
@@ -174,7 +154,6 @@ jobs:
174154
cd ${{ github.workspace }}
175155
zip -r ${{ steps.strings2.outputs.deploy-output-name }} ${{ steps.strings.outputs.deploy-name }}
176156
177-
178157
# -------------------------
179158
# Upload artifacts
180159
# -------------------------

0 commit comments

Comments
 (0)