summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2026-03-20 18:02:12 -0500
committerGitHub <noreply@github.com>2026-03-20 20:02:12 -0300
commit3e3e7b8af9eac176f13f1aebef9a62e0e7971237 (patch)
tree3751cbf1dc766679ae2b9d4e198253e3455e81a0
parent0b90f2620e565a622f6f2b1256022d4c12fcea50 (diff)
MacOS CI Universal Build (#246)
* Another attempt * Use macports
-rw-r--r--.github/macports.yml21
-rw-r--r--.github/workflows/mac.yml14
-rw-r--r--.github/workflows/main.yml53
-rw-r--r--README.md3
4 files changed, 38 insertions, 53 deletions
diff --git a/.github/macports.yml b/.github/macports.yml
new file mode 100644
index 00000000..97622472
--- /dev/null
+++ b/.github/macports.yml
@@ -0,0 +1,21 @@
+ports:
+ - name: libsdl2
+ select: [ universal ]
+ - name: libpng
+ select: [ universal ]
+ - name: glew
+ select: [ universal ]
+ - name: libzip
+ select: [ universal ]
+ - name: nlohmann-json
+ select: [ universal ]
+ - name: tinyxml2
+ select: [ universal ]
+ - name: libogg
+ select: [ universal ]
+ - name: libopus
+ select: [ universal ]
+ - name: opusfile
+ select: [ universal ]
+ - name: libvorbis
+ select: [ universal ] \ No newline at end of file
diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml
index d7471c18..266a808a 100644
--- a/.github/workflows/mac.yml
+++ b/.github/workflows/mac.yml
@@ -8,16 +8,16 @@ jobs:
build:
runs-on: macos-14
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
with:
submodules: recursive
- - uses: actions/cache@v4
+ - uses: melusina-org/setup-macports@v1
with:
- path: ~/Library/Caches/Homebrew
- key: ${{ runner.os }}-${{ runner.arch }}-homebrew-${{ github.ref }}-${{ github.sha }}
- - name: Install dependencies
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade
+ parameters: '.github/macports.yml'
+ - uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: macos-ccache-${{ github.ref }}
- name: Build
run: |
- cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build-cmake -j \ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e35cc68e..41c68a74 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -73,57 +73,22 @@ jobs:
name: starship-windows
path: starship-release
- build-macos-x64:
- needs: generate-port-o2r
- runs-on: macos-14-large # macos-14-large is the only way we can get x64
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
- - uses: actions/cache@v4
- with:
- path: ~/Library/Caches/Homebrew
- key: ${{ runner.os }}-${{ runner.arch }}-homebrew-${{ github.ref }}-${{ github.sha }}
- - name: Install dependencies
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade
- - name: Build
- run: |
- cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
- cmake --build build-cmake -j
- - name: Download starship.o2r
- uses: actions/download-artifact@v4
- with:
- name: starship.o2r
- path: ./build-cmake
- - name: Create Package
- run: |
- (cd build-cmake && cpack)
- mv _packages/*.dmg Starship.dmg
- mv README.md readme.txt
- - name: Publish packaged artifacts
- uses: actions/upload-artifact@v4
- with:
- name: Starship-mac-x64
- path: |
- Starship.dmg
- readme.txt
-
- build-macos-arm64:
+ build-macos:
needs: generate-port-o2r
runs-on: macos-14
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
with:
submodules: recursive
- - uses: actions/cache@v4
+ - uses: melusina-org/setup-macports@v1
with:
- path: ~/Library/Caches/Homebrew
- key: ${{ runner.os }}-${{ runner.arch }}-homebrew-${{ github.ref }}-${{ github.sha }}
- - name: Install dependencies
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew bundle --no-upgrade
+ parameters: '.github/macports.yml'
+ - uses: hendrikmuhs/ccache-action@v1.2
+ with:
+ key: macos-ccache-${{ github.ref }}
- name: Build
run: |
- cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"
cmake --build build-cmake -j
- name: Download starship.o2r
uses: actions/download-artifact@v4
@@ -138,7 +103,7 @@ jobs:
- name: Publish packaged artifacts
uses: actions/upload-artifact@v4
with:
- name: Starship-mac-arm64
+ name: Starship-mac
path: |
Starship.dmg
readme.txt
diff --git a/README.md b/README.md
index f8690383..eaccfeb8 100644
--- a/README.md
+++ b/README.md
@@ -83,8 +83,7 @@ If you want to manually compile Starship, please consult the [building instructi
If you want to playtest a continuous integration build, you can find them at the links below. Keep in mind that these are for playtesting only, and you will likely encounter bugs and possibly crashes.
* [Windows](https://nightly.link/HarbourMasters/Starship/workflows/main/main/starship-windows.zip)
-* [macOS (Apple Silicon)](https://nightly.link/HarbourMasters/Starship/workflows/main/main/Starship-mac-arm64.zip)
-* [macOS (Intel)](https://nightly.link/HarbourMasters/Starship/workflows/main/main/Starship-mac-x64.zip)
+* [macOS](https://nightly.link/HarbourMasters/Starship/workflows/main/main/Starship-mac.zip)
* [Linux](https://nightly.link/HarbourMasters/Starship/workflows/main/main/Starship-linux.zip)
* [Switch](https://nightly.link/HarbourMasters/Starship/workflows/main/main/Starship-switch.zip)