Scripting Support, Custom Audio, Custom Models AND MORE - Poowaahhhhhhhhhh #139
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: MacOS Validation | |
| on: [pull_request] | |
| jobs: | |
| build: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Configure ccache | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| create-symlink: true | |
| save: ${{ github.ref_name == github.event.repository.default_branch }} | |
| key: ${{ runner.os }}-14-ccache-${{ github.ref }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-14-ccache-${{ github.ref }} | |
| ${{ runner.os }}-14-ccache | |
| # Needed to apply sudo for macports cache restore | |
| # - name: Install gtar wrapper | |
| # run: | | |
| # sudo mv /opt/homebrew/bin/gtar /opt/homebrew/bin/gtar.orig | |
| # sudo cp .github/workflows/gtar /opt/homebrew/bin/gtar | |
| # sudo chmod +x /opt/homebrew/bin/gtar | |
| - name: Restore Cached MacPorts | |
| id: restore-cache-macports | |
| uses: actions/cache/restore@v4 | |
| with: | |
| key: ${{ runner.os }}-14-macports-${{ github.ref }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-14-macports-${{ github.ref }} | |
| ${{ runner.os }}-14-macports- | |
| path: /opt/local/ | |
| - name: Install MacPorts (if necessary) | |
| run: | | |
| if command -v /opt/local/bin/port 2>&1 >/dev/null; then | |
| echo "MacPorts already installed" | |
| else | |
| echo "Installing MacPorts" | |
| wget https://github.com/macports/macports-base/releases/download/v2.11.5/MacPorts-2.11.5-14-Sonoma.pkg | |
| sudo installer -pkg ./MacPorts-2.11.5-14-Sonoma.pkg -target / | |
| fi | |
| echo "/opt/local/bin:/opt/local/sbin" >> "$GITHUB_PATH" | |
| - name: Install dependencies | |
| run: | | |
| brew uninstall --ignore-dependencies libpng | |
| sudo port install libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal libogg +universal libopus +universal opusfile +universal libvorbis +universal | |
| brew install ninja | |
| - name: Build (Universal) | |
| run: | | |
| export PATH="/usr/lib/ccache:/opt/homebrew/opt/ccache/libexec:/usr/local/opt/ccache/libexec:$PATH" | |
| cmake --no-warn-unused-cli -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
| cmake --build build-cmake --config Release --parallel 10 | |
| - name: Create Package | |
| run: | | |
| mkdir ghostship-release | |
| mv build-cmake/Ghostship ghostship-release/ | |
| - name: Publish packaged artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ghostship-mac-universal | |
| path: ghostship-release | |
| retention-days: 1 | |
| - name: Save Cache MacPorts | |
| if: ${{ github.ref_name == github.event.repository.default_branch }} | |
| uses: actions/cache/save@v4 | |
| with: | |
| key: ${{ steps.restore-cache-macports.outputs.cache-primary-key }} | |
| path: /opt/local/ |