Skip to content

Commit

Permalink
build: try support C23 in Mac builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Jan 29, 2025
1 parent 39fd9f8 commit ec4af97
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/actions/prepare_macos_tooling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -170,7 +174,7 @@ runs:
# 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 }}
sudo rsync -arvq --copy-unsafe-links ${{ inputs.CACHE_SRC_DIR }}/ ${{ inputs.CACHE_DIR }}
- name: "Save dependencies to cache"
if: steps.restore-cache.outputs.cache-hit != 'true'
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/job_build_tr1_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,17 @@ 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 }}"
meson setup $BUILD_DIR $BUILD_OPTIONS
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 }}"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/job_build_tr2_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ 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 }}"
meson setup $BUILD_DIR $BUILD_OPTIONS
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 }}"
Expand Down

0 comments on commit ec4af97

Please sign in to comment.