From 954a88bd0621283d98f7db9a78463176a691c81e Mon Sep 17 00:00:00 2001 From: Jonne Kokkonen Date: Tue, 27 Aug 2024 09:16:07 +0300 Subject: [PATCH 1/2] Try to add SDL2 cache to intel build --- .github/workflows/build-macos-intel.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index 9930c26..c24c01e 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -38,12 +38,21 @@ 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 @@ -71,4 +80,4 @@ jobs: with: name: m8c-${{ env.NOW }}-macos-intel path: | - m8c-${{ env.NOW }}-macos-intel.dmg \ No newline at end of file + m8c-${{ env.NOW }}-macos-intel.dmg From 87fc17991365f7100190fdd366f54f6486435e3f Mon Sep 17 00:00:00 2001 From: Jonne Kokkonen Date: Tue, 27 Aug 2024 09:24:03 +0300 Subject: [PATCH 2/2] add separate step for sdl2 install --- .github/workflows/build-macos-intel.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-macos-intel.yml b/.github/workflows/build-macos-intel.yml index c24c01e..69de59c 100644 --- a/.github/workflows/build-macos-intel.yml +++ b/.github/workflows/build-macos-intel.yml @@ -54,7 +54,19 @@ jobs: - 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: |