Skip to content

Commit cc6093e

Browse files
committed
Finally +universal if it works
1 parent cfddadc commit cc6093e

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

.github/workflows/mac.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@ on: [pull_request]
33

44
jobs:
55
build:
6-
runs-on: macOS-latest
6+
runs-on: macos-latest
77
steps:
88
- uses: actions/checkout@v4
99
with:
1010
submodules: recursive
11-
- name: Install dependencies
12-
run: brew install sdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools
13-
- name: Build
11+
- name: Setup MacPorts
12+
uses: melusina-org/setup-macports@v1
13+
- name: Install dependencies (Universal)
14+
run: sudo port install libsdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools +universal
15+
- name: Build (Universal)
1416
run: |
15-
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
17+
# CMAKE_OSX_ARCHITECTURES triggers the dual-architecture build
18+
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/local "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
1619
cmake --build build-cmake -j
1720
- name: Create Package
1821
run: |
@@ -21,6 +24,6 @@ jobs:
2124
- name: Publish packaged artifacts
2225
uses: actions/upload-artifact@v4
2326
with:
24-
name: ghostship-mac-x64
27+
name: ghostship-mac-universal
2528
path: ghostship-release
2629
retention-days: 1

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,14 @@ jobs:
8282
- uses: actions/checkout@v4
8383
with:
8484
submodules: recursive
85-
- name: Install dependencies
86-
run: brew install sdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools
87-
- name: Build
85+
- name: Setup MacPorts
86+
uses: melusina-org/setup-macports@v1
87+
- name: Install dependencies (Universal)
88+
run: sudo port install libsdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools +universal
89+
- name: Build (Universal)
8890
run: |
89-
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
91+
# Added MacPorts path and the dual-architecture flag
92+
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/opt/local "-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
9093
cmake --build build-cmake --config Release -j3
9194
- name: Download ghostship.o2r
9295
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)