Skip to content

Commit 5aba47a

Browse files
committed
feat(ci): add macOS ARM build, test and release
- Add build-macos job to build.yml and release.yml (macos-14 ARM) - Update slang submodule to v10.0+ for Apple Clang compatibility - macdeployqt on cmake-generated .app bundle, package as DMG - DMG contains QSoC.app (GUI) + standalone qsoc CLI binary - Smoke test with inline-generated CSV bus and Verilog module - Disable mimalloc on macOS (same as Windows) - Set CMAKE_POLICY_VERSION_MINIMUM for yaml-cpp compatibility Signed-off-by: Huang Rui <vowstar@gmail.com>
1 parent ff92a02 commit 5aba47a

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ jobs:
206206
cmake -B build -G Ninja
207207
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
208208
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
209+
-DSLANG_USE_MIMALLOC=OFF
209210
-DENABLE_UNIT_TEST=OFF
210211
-DENABLE_CLANG_TIDY=OFF
211212
-DENABLE_DOXYGEN=OFF
@@ -216,6 +217,7 @@ jobs:
216217
cmake -B build -G Ninja
217218
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
218219
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
220+
-DSLANG_USE_MIMALLOC=OFF
219221
-DENABLE_CLANG_TIDY=OFF
220222
-DENABLE_DOXYGEN=OFF
221223
@@ -226,7 +228,7 @@ jobs:
226228
if: github.event_name == 'push'
227229
run: |
228230
set -e
229-
QSOC=./build/qsoc
231+
QSOC=./build/qsoc.app/Contents/MacOS/qsoc
230232
TMPD=$(mktemp -d)
231233
trap "rm -rf $TMPD" EXIT
232234
echo "--- version ---"
@@ -247,7 +249,7 @@ jobs:
247249
if: github.event_name == 'pull_request'
248250
run: |
249251
cd build
250-
ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure
252+
QT_QPA_PLATFORM=offscreen ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure
251253
252254
cppcheck:
253255
runs-on: ubuntu-latest

.github/workflows/release.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ jobs:
228228
cmake -B build -G Ninja
229229
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
230230
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
231+
-DSLANG_USE_MIMALLOC=OFF
231232
-DENABLE_CLANG_TIDY=OFF
232233
-DENABLE_DOXYGEN=OFF
233234
-DENABLE_UNIT_TEST=OFF
@@ -237,26 +238,10 @@ jobs:
237238

238239
- name: Deploy
239240
run: |
240-
mkdir -p deploy/QSoC.app/Contents/MacOS
241-
cp build/qsoc deploy/QSoC.app/Contents/MacOS/
242-
cat > deploy/QSoC.app/Contents/Info.plist << 'EOF'
243-
<?xml version="1.0" encoding="UTF-8"?>
244-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
245-
<plist version="1.0">
246-
<dict>
247-
<key>CFBundleExecutable</key><string>qsoc</string>
248-
<key>CFBundleIdentifier</key><string>com.vowstar.qsoc</string>
249-
<key>CFBundleName</key><string>QSoC</string>
250-
<key>CFBundleVersion</key><string>1.0.2</string>
251-
<key>CFBundleShortVersionString</key><string>1.0</string>
252-
<key>CFBundlePackageType</key><string>APPL</string>
253-
<key>LSMinimumSystemVersion</key><string>11.0</string>
254-
</dict>
255-
</plist>
256-
EOF
241+
mkdir deploy
242+
cp -a build/qsoc.app deploy/QSoC.app
257243
macdeployqt deploy/QSoC.app -verbose=1
258-
# Also keep standalone CLI binary
259-
cp build/qsoc deploy/
244+
cp deploy/QSoC.app/Contents/MacOS/qsoc deploy/qsoc
260245
261246
- name: Verify deployment
262247
run: |

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
422422
MACOSX_BUNDLE_GUI_IDENTIFIER com.vowstar.${PROJECT_NAME}
423423
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
424424
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
425+
MACOSX_BUNDLE TRUE
425426
)
426427

427428
install(TARGETS ${PROJECT_NAME}

external/slang

Submodule slang updated 388 files

0 commit comments

Comments
 (0)