Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SDL2 build caching to MacOS Intel build GH actions #166

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/build-macos-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,35 @@ jobs:

- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: 'Cache SDL2 files'
id: cache-x86_64-sdl2-files
uses: actions/cache@v4
with:
path: 'SDL2-2.30.4'
key: mac-x86_64-sdl2-files

- name: 'Download SDL2 sources'
if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
run: |
(curl https://www.libsdl.org/release/SDL2-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL2-$SDL_VERSION.tar.gz) | tar xvf -

- name: 'Build SDL2'
if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
run: |
export MACOSX_DEPLOYMENT_TARGET="10.9" && cd SDL2-$SDL_VERSION && mkdir build_x86_64 && cd build_x86_64 && ../configure CPPFLAGS="-mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot $HOME/x86_64/SDKs/MacOSX10.9.sdk" --prefix="$HOME/x86_64prefix" && make && make install
export MACOSX_DEPLOYMENT_TARGET="10.9"
pushd SDL2-$SDL_VERSION
mkdir build_x86_64
cd build_x86_64
../configure CPPFLAGS="-mmacosx-version-min=10.7 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot $HOME/x86_64/SDKs/MacOSX10.9.sdk" --prefix="$HOME/x86_64prefix"
make
popd

- name: 'Install SDL2'
run: |
pushd SDL2-$SDL_VERSION/build_x86_64
make install
popd

- name: 'Download libserialport sources'
run: |
Expand All @@ -71,4 +92,4 @@ jobs:
with:
name: m8c-${{ env.NOW }}-macos-intel
path: |
m8c-${{ env.NOW }}-macos-intel.dmg
m8c-${{ env.NOW }}-macos-intel.dmg
Loading