build: try support C23 in Mac builds

This commit is contained in:
Marcin Kurczewski 2025-01-29 09:16:42 +01:00
parent c34615bd43
commit 0ee6f72d45
3 changed files with 14 additions and 2 deletions

View file

@ -40,6 +40,10 @@ runs:
sudo port select --set pip pip312
sudo port select --set pip3 pip312
# Install Clang to get better C23 support.
sudo port -N install clang-16
sudo port select --set clang mp-clang-16
# Install the rest.
sudo port -N install create-dmg meson ninja pkgconfig
sudo pip3 install pyjson5
@ -169,8 +173,8 @@ runs:
sudo find ${{ inputs.CACHE_SRC_DIR }} -type l ! -exec test -e {} \; -exec rm {} \;
# Trying to cache the source directory directly leads to permission errors,
# so copy it to an intermediate temporary directory. Also, expands all the symlinks to hard copies.
sudo rsync -arvqL ${{ inputs.CACHE_SRC_DIR }}/ ${{ inputs.CACHE_DIR }}
# so copy it to an intermediate temporary directory.
sudo rsync -arvq ${{ inputs.CACHE_SRC_DIR }}/ ${{ inputs.CACHE_DIR }}
- name: "Save dependencies to cache"
if: steps.restore-cache.outputs.cache-hit != 'true'

View file

@ -82,6 +82,8 @@ jobs:
sudo port -N install apple-pki-bundle curl-ca-bundle
- name: Build arm64 and create app bundle
env:
CC: clang
run: |
BUILD_DIR=build-arm64
BUILD_OPTIONS="src/tr1 --prefix=/tmp/TR1X.app --bindir=Contents/MacOS --buildtype ${{ inputs.target }}"
@ -89,6 +91,8 @@ jobs:
meson install -C $BUILD_DIR
- name: Build x86-64
env:
CC: clang
run: |
BUILD_DIR=build-x86-64
BUILD_OPTIONS="src/tr1 --prefix=/tmp/TR1X.app --bindir=Contents/MacOS --cross-file tools/shared/mac/x86-64_cross_file.txt --buildtype ${{ inputs.target }}"

View file

@ -73,6 +73,8 @@ jobs:
sudo port -N install apple-pki-bundle curl-ca-bundle
- name: Build arm64 and create app bundle
env:
CC: clang
run: |
BUILD_DIR=build-arm64
BUILD_OPTIONS="src/tr2 --prefix=/tmp/TR2X.app --bindir=Contents/MacOS --buildtype ${{ inputs.target }}"
@ -80,6 +82,8 @@ jobs:
meson install -C $BUILD_DIR
- name: Build x86-64
env:
CC: clang
run: |
BUILD_DIR=build-x86-64
BUILD_OPTIONS="src/tr2 --prefix=/tmp/TR2X.app --bindir=Contents/MacOS --cross-file tools/shared/mac/x86-64_cross_file.txt --buildtype ${{ inputs.target }}"