ref: 7f551c99a6a3c7b54cf6a370ab06e4f4f904511c
parent: a7bc443594a319178f48a3d0fa5a918f6f425248
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Sun Mar 2 08:32:54 EST 2025
use macos 13 runner for intel mac build (#183)
--- a/.github/workflows/build-macos-intel.yml
+++ b/.github/workflows/build-macos-intel.yml
@@ -8,32 +8,15 @@
jobs:
build-macos:
- runs-on: macos-14
+ runs-on: macos-13
env:
- SDL_VERSION: 3.2.4
+ SDL_VERSION: 3.2.6
SDL_SHA256: 2938328317301dfbe30176d79c251733aa5e7ec5c436c800b99ed4da7adcb0f0
steps:
- name: 'Install dependencies'
- run: brew install cmake pkg-config autoconf automake libtool
+ run: brew install cmake pkg-config autoconf automake libtool sdl3 libserialport
- - name: 'Cache x86_64 files'
- id: cache-x86_64-files
- uses: actions/cache@v4
- with:
- path: '/Users/runner/x86_64'
- key: mac-x86_64-files
-
- - name: 'Download 10.14 SDK for x86_64'
- if: steps.cache-x86_64-files.outputs.cache-hit != 'true'
- run: |
- mkdir -p "$HOME/x86_64"
- pushd "$HOME/x86_64"
- mkdir SDKs
- cd SDKs
- curl -L "https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.14.sdk.tar.xz" | tar -xvf -
- popd
-
- name: 'Checkout'
uses: actions/checkout@v4
@@ -40,51 +23,15 @@
- name: Set current date as env variable
run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- - name: 'Cache SDL3 files'
- id: cache-x86_64-sdl3-files
- uses: actions/cache@v4
- with:
- path: 'SDL3-3.2.4'
- key: mac-x86_64-sdl3-files
-
- - name: 'Download SDL3 sources'
- if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
- run: |
- (curl https://www.libsdl.org/release/SDL3-$SDL_VERSION.tar.gz || curl -L https://github.com/libsdl-org/SDL/releases/download/release-$SDL_VERSION/SDL3-$SDL_VERSION.tar.gz) | tar zxvf -
-
- - name: 'Build SDL3'
- if: steps.cache-x86_64-sdl2-files.outputs.cache-hit != 'true'
- run: |
- export MACOSX_DEPLOYMENT_TARGET="10.14"
- pushd SDL3-$SDL_VERSION
- mkdir build_x86_64
- export MACOSX_DEPLOYMENT_TARGET="10.14" && export PKG_CONFIG_PATH="$HOME/x86_64prefix/lib/pkgconfig" && export CFLAGS="-arch x86_64 -mmacosx-version-min=10.14 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 -isysroot $HOME/x86_64/SDKs/MacOSX10.14.sdk"
- cmake -S . -B build_x86_64 -DSDL_FRAMEWORK=ON -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 -DMAC_OS_X_VERSION_MIN_REQUIRED=1014 -DCMAKE_OSX_SYSROOT=$HOME/x86_64/SDKs/MacOSX10.14.sdk
- cmake --build build_x86_64
- cmake --install build_x86_64 --prefix $HOME/x86_64prefix
- popd
-
- - name: 'Install SDL3'
- run: |
- pushd SDL3-$SDL_VERSION/build_x86_64
- make install
- popd
-
- - name: 'Download libserialport sources'
- run: |
- curl -L -O https://github.com/sigrokproject/libserialport/archive/refs/heads/master.zip && unzip master.zip && rm master.zip
-
- - name: 'Build libserialport'
- run: |
- pushd libserialport-master
- mkdir autostuff
- autoreconf -I"$HOME/x86_64prefix/share/aclocal" -i
- export MACOSX_DEPLOYMENT_TARGET="10.14" && mkdir build_x86_64 && cd build_x86_64 && ../configure CFLAGS="-arch x86_64 -mmacosx-version-min=10.14 -DMAC_OS_X_VERSION_MIN_REQUIRED=1014 -isysroot $HOME/x86_64/SDKs/MacOSX10.14.sdk" LDFLAGS="-arch x86_64 -F$HOME/x86_64/SDKs/MacOSX10.14.sdk/System/Library/Frameworks -L/usr/lib -L/usr/lib/system -Wl,-syslibroot,$HOME/x86_64/SDKs/MacOSX10.14.sdk" --host=x86_64-apple-darwin13 --prefix="$HOME/x86_64prefix" && make && make install
- popd
-
- name: 'Build m8c'
+ id: buildApplication
+ continue-on-error: true
run: |
- export MACOSX_DEPLOYMENT_TARGET="10.14" && export PKG_CONFIG_PATH="$HOME/x86_64prefix/lib/pkgconfig" && export CFLAGS="-arch x86_64 -mmacosx-version-min=10.14 -DMAC_OS_X_VERSION_MIN_REQUIRED=1014 -isysroot $HOME/x86_64/SDKs/MacOSX10.14.sdk" && mkdir build_x86_64 && cd build_x86_64 && cmake -DCMAKE_OSX_ARCHITECTURES="x86_64" .. && cpack -V
+ mkdir -p build_x86_64 && cd build_x86_64 && cmake .. && cpack -V
+
+ - name: 'View debug log if compilation fails'
+ if: failure() && steps.buildApplication.outcome == 'failure'
+ run: cat /Users/runner/work/m8c/m8c/build_x86_64/_CPack_Packages/Darwin/DragNDrop/PreinstallOutput.log
- name: 'Build package'
run: |
--
⑨