Skip to content

Commit 04f58c0

Browse files
authored
ci: macOS artifacts (ZIP) + Intel runner + ccache (#2046)
Issue #1403 checklist: - Output binaries for macOS builds: run CPack on macOS and upload the resulting openxray*.zip as a workflow artifact. What this change does: - Add a minimal macOS matrix: macos-latest (arm64) + macos-15-intel (x86_64). - Force -DCPACK_GENERATOR=ZIP on macOS for deterministic packaging. - Speed/stability: install ccache and cache ~/.ccache; disable Homebrew auto-updates via HOMEBREW_NO_AUTO_UPDATE.
1 parent 2e63688 commit 04f58c0

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/cibuild.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
env:
8282
CFLAGS: "-w"
8383
CXXFLAGS: "-w"
84+
HOMEBREW_NO_AUTO_UPDATE: 1
8485

8586
strategy:
8687
fail-fast: false
@@ -99,7 +100,9 @@ jobs:
99100
- { name: Alpine, os: ubuntu-latest, arch: x86, cc: gcc, shell: 'alpine.sh {0}', flags: "-DXRAY_LINKER=mold", }
100101
- { name: Fedora, os: ubuntu-latest, arch: x86_64, cc: gcc, container: 'fedora:latest', }
101102
#- { name: Haiku, os: ubuntu-latest, arch: x86_64, cc: x86_64-unknown-haiku-gcc, cxx: x86_64-unknown-haiku-g++, container: 'haiku/cross-compiler:x86_64-r1beta4', }
102-
- { name: macOS, os: macos-latest, arch: arm64, cc: clang, threads: 3 }
103+
# macOS images have tighter concurrency limits; keep the matrix minimal.
104+
- { name: macOS, os: macos-latest, arch: arm64, cc: clang, threads: 3, flags: "-DCPACK_GENERATOR=ZIP" }
105+
- { name: macOS Intel, os: macos-15-intel, arch: x86_64, cc: clang, flags: "-DCMAKE_OSX_ARCHITECTURES=x86_64 -DCPACK_GENERATOR=ZIP" }
103106

104107
configuration: [Debug, Mixed, Release, ReleaseMasterGold]
105108

@@ -133,8 +136,7 @@ jobs:
133136
- name: Install macOS packages
134137
if: ${{ startsWith(matrix.platform.name, 'macOS') }}
135138
run: |
136-
brew update
137-
brew install sdl2 lzo libogg libvorbis theora
139+
brew install ccache cmake sdl2 lzo libogg libvorbis theora openal-soft jpeg-turbo
138140
139141
- name: Install Fedora packages
140142
if: ${{ matrix.platform.name == 'Fedora' }}
@@ -150,13 +152,27 @@ jobs:
150152
with:
151153
submodules: recursive
152154

155+
- name: Restore ccache
156+
if: ${{ startsWith(matrix.platform.name, 'macOS') }}
157+
uses: actions/cache@main
158+
with:
159+
path: ~/.ccache
160+
key: ccache-${{ runner.os }}-${{ matrix.platform.arch }}-${{ matrix.configuration }}-${{ hashFiles('CMakeLists.txt', 'cmake/**', 'src/**/CMakeLists.txt', 'Externals/**/CMakeLists.txt') }}
161+
restore-keys: |
162+
ccache-${{ runner.os }}-${{ matrix.platform.arch }}-${{ matrix.configuration }}-
163+
ccache-${{ runner.os }}-${{ matrix.platform.arch }}-
164+
153165
- name: Run CMake
154166
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_UNITY_BUILD=ON ${{ matrix.platform.flags }} --log-level VERBOSE
155167

156168
- name: Run CMake Build
157169
id: cmake-build
158170
run: cmake --build build --config ${{ matrix.configuration }} --parallel ${{ matrix.platform.threads || 4 }}
159171

172+
- name: Show ccache stats
173+
if: ${{ startsWith(matrix.platform.name, 'macOS') }}
174+
run: ccache -s || true
175+
160176
- name: Make package
161177
if: ${{ steps.cmake-build.outcome == 'success' }}
162178
id: make-package

0 commit comments

Comments
 (0)