File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 required : true
66 build-preset :
77 required : true
8+ vcpkg-triplet :
9+ required : true
810
911runs :
1012 using : " composite"
1719 run : |
1820 cmake --preset ${{ inputs.config-preset }} \
1921 -G Xcode \
20- -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
22+ -DVCPKG_TARGET_TRIPLET=${{ vcpkg-triplet }} \
2123 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.6
2224 shell : bash
2325
Original file line number Diff line number Diff line change 1313 uses : actions/checkout@v4
1414 with :
1515 submodules : recursive
16-
17- - uses : ./.github/actions/common-windows
16+
17+ - name : Configure and build
18+ uses : ./.github/actions/common-windows
1819 with :
1920 config-preset : Release
2021 build-preset : Release
@@ -36,19 +37,34 @@ jobs:
3637 uses : actions/checkout@v4
3738 with :
3839 submodules : recursive
39-
40- - uses : ./.github/actions/common-macos
40+
41+ - name : Configure and build x64
42+ uses : ./.github/actions/common-macos
4143 with :
4244 config-preset : Release
4345 build-preset : Release
46+ vcpkg-triplet : x64-osx
47+
48+ - name : Configure and build arm64
49+ uses : ./.github/actions/common-macos
50+ with :
51+ config-preset : Debug
52+ build-preset : Tests
53+ vcpkg-triplet : arm64-osx
54+
55+ - name : Merge binaries
56+ run : |
57+ cp -R ./bin/x86_x64/Release/PartStackerGUI.app ./bin/universal/Release/PartStackerGUI.app
58+ lipo -create \
59+ ./bin/x86_x64/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI \
60+ ./bin/arm64/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI \
61+ -output ./bin/universal/Release/PartStackerGUI.app/Contents/MacOS/PartStackerGUI
4462
4563 - name : Package into DMG
4664 run : |
47- mkdir -p ./bin/Release/dmg-root
48- mv ./bin/Release/PartStackerGUI.app ./bin/Release/dmg-root/
4965 hdiutil create \
5066 -volname "PartStackerGUI" \
51- -srcfolder ./bin/Release/dmg-root \
67+ -srcfolder ./bin/universal/Release \
5268 -format UDZO \
5369 ./bin/Release/PartStackerGUI-mac.dmg
5470
Original file line number Diff line number Diff line change 1010 uses : actions/checkout@v4
1111 with :
1212 submodules : recursive
13-
14- - uses : ./.github/actions/common-windows
13+
14+ - name : Configure and build
15+ uses : ./.github/actions/common-windows
1516 with :
1617 config-preset : Debug
1718 build-preset : Tests
@@ -28,11 +29,13 @@ jobs:
2829 uses : actions/checkout@v4
2930 with :
3031 submodules : recursive
31-
32- - uses : ./.github/actions/common-macos
32+
33+ - name : Configure and build
34+ uses : ./.github/actions/common-macos
3335 with :
3436 config-preset : Debug
3537 build-preset : Tests
38+ vcpkg-triplet : arm64-osx
3639
3740 - name : Run Tests
3841 run : |
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.30)
33if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" )
44 set (VCPKG_TARGET_TRIPLET "x64-windows-static-md" CACHE STRING "" FORCE )
55elseif (CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" )
6- set (VCPKG_TARGET_TRIPLET "x64 -osx" CACHE STRING "" FORCE )
6+ set (VCPKG_TARGET_TRIPLET "arm64 -osx" CACHE STRING "" FORCE )
77else ()
88 message (FATAL_ERROR "Unsupported platform: ${CMAKE_HOST_SYSTEM_NAME} " )
99endif ()
Original file line number Diff line number Diff line change @@ -39,5 +39,5 @@ set(PSTACK_OUTPUT_FILE_NAME "PartStackerGUI")
3939pstack_configure_target_info (pstack_gui )
4040set_target_properties (pstack_gui PROPERTIES
4141 OUTPUT_NAME ${PSTACK_OUTPUT_FILE_NAME}
42- RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR} /bin"
42+ RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR} /${CMAKE_OSX_ARCHITECTURES} / bin"
4343)
You can’t perform that action at this time.
0 commit comments