Skip to content

Commit

Permalink
Use SDL2 frameworks to build CDDA on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
BrettDong committed Mar 25, 2023
1 parent f9dd628 commit f15c84c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ jobs:
native: osx
sanitize: undefined
tiles: 1
sound: 1
sound: 0
localize: 1
title: Clang 14, macOS 12, Tiles, Sound, UBSan
title: Clang 14, macOS 12, Tiles, UBSan
# ~880MB ccache-compressed in a clean build
# ~100 compressed
# observed usage: 3.85GB -> 500MB
Expand Down Expand Up @@ -259,10 +259,17 @@ jobs:
sudo ln -s /usr/bin /opt/mock-gcc-11/bin
sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu
sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11
- name: install dependencies (mac)
- name: install runtime dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
uses: BrettDong/setup-sdl2-frameworks@v1
with:
sdl2: latest
sdl2-ttf: latest
sdl2-image: latest
- name: install build dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install gettext ccache parallel
- name: prepare
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/requirements.sh
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,17 @@ jobs:
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
libsdl2-mixer-dev libpulse-dev ccache gettext parallel
- name: Install dependencies (mac)
- name: Install runtime dependencies (mac)
if: runner.os == 'macOS'
uses: BrettDong/setup-sdl2-frameworks@v1
with:
sdl2: latest
sdl2-ttf: latest
sdl2-image: latest
- name: Install build dependencies (mac)
if: runner.os == 'macOS'
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install gettext ccache parallel
pip3 install mac_alias==2.2.0 dmgbuild==1.4.2 biplist
- name: Create VERSION.TXT
shell: bash
Expand Down Expand Up @@ -279,7 +286,7 @@ jobs:
- name: Build CDDA (osx)
if: runner.os == 'macOS'
run: |
make -j3 TILES=${{ matrix.tiles }} SOUND=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 USE_HOME_DIR=1 OSX_MIN=10.13 dmgdist
make -j3 TILES=${{ matrix.tiles }} RELEASE=1 LOCALIZE=1 LANGUAGES=all BACKTRACE=0 PCH=0 USE_HOME_DIR=1 OSX_MIN=10.13 FRAMEWORK=1 dmgdist
mv Cataclysm.dmg cdda-${{ matrix.artifact }}-${{ needs.release.outputs.timestamp }}.dmg
- name: Set up JDK 8 (android)
if: runner.os == 'Linux' && matrix.android != 'none' && matrix.mxe == 'none'
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/gha_compile_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ else
# The OSX_MIN version here should match that used in release builds so that
# CI detects issues that will affect releases. It doesn't affect builds on
# other platforms.
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0 OSX_MIN=10.13
make -j "$num_jobs" RELEASE=1 CCACHE=1 CROSS="$CROSS_COMPILATION" LINTJSON=0 OSX_MIN=10.13 FRAMEWORK=1
fi

# vim:tw=0

0 comments on commit f15c84c

Please sign in to comment.