build: target macos 13 for x86 binaries (#6221)

* build: target older macos

* cleanup

* Align xcode versions

* Simplify --x86-macos

* use cmake flag in compile.sh i.s.o. env var in yml

* more cleanups

* adress initial reviews

* generate triplet file in compile.sh

* fix triplet name

* pass matrix.target as version

* small refactor

* another minor refactor

* ci: fix ccache cleaning

* add more comments

* try passing triplets config as cmake variables

* Revert "try passing triplets config as cmake variables"

This reverts commit 77e83e8590.

* move logic inside runner == macos if

* move logic to env var

* simplify script

* format script

"I just thinks it looks better like this"

* make script work for arm as well, might be useful

* use hyphen

* use DVCPKG_HOST_TRIPLET instead of DVCPKG_TARGET_TRIPLET

* use DVCPKG_HOST_TRIPLET AND DVCPKG_TARGET_TRIPLET

---------

Co-authored-by: ebbit1q <ebbit1q@gmail.com>
This commit is contained in:
Bruno Alexandre Rosa
2025-10-21 20:00:25 -03:00
committed by GitHub
parent 8ebfc40de5
commit 817a3f979e
2 changed files with 44 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ permissions:
contents: write
id-token: write
attestations: write
actions: write # needed for ccache action to be able to delete gha caches
on:
push:
@@ -245,10 +246,11 @@ jobs:
include:
- target: 13
soc: Intel
os: macos-13
xcode: "14.3.1"
os: macos-15-intel
xcode: "16.4"
type: Release
make_package: 1
override_target: 13
- target: 14
soc: Apple
@@ -260,14 +262,14 @@ jobs:
- target: 15
soc: Apple
os: macos-15
xcode: "16.2"
xcode: "16.4"
type: Release
make_package: 1
- target: 15
soc: Apple
os: macos-15
xcode: "16.2"
xcode: "16.4"
type: Debug
name: macOS ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
@@ -331,6 +333,7 @@ jobs:
CMAKE_GENERATOR: '${{env.CMAKE_GENERATOR}}'
VCPKG_DISABLE_METRICS: 1
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
TARGET_MACOS_VERSION: ${{ matrix.override_target }}
run: .ci/compile.sh --server --test --ccache "$CCACHE_SIZE" --vcpkg
- name: Sign app bundle