mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
CI: Replace ccache with Xcode compile cache
This commit is contained in:
@@ -80,8 +80,8 @@ jobs:
|
||||
: Set Up Environment 🔧
|
||||
if (( ${+RUNNER_DEBUG} )) setopt XTRACE
|
||||
|
||||
print '::group::Enable Xcode 16.4'
|
||||
sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
|
||||
print '::group::Enable Xcode 26.1'
|
||||
sudo xcode-select --switch /Applications/Xcode_26.1.app/Contents/Developer
|
||||
print '::endgroup::'
|
||||
|
||||
print '::group::Clean Homebrew Environment'
|
||||
@@ -97,13 +97,19 @@ jobs:
|
||||
local -A arch_names=(x86_64 intel arm64 apple)
|
||||
print "cpuName=${arch_names[${{ matrix.target }}]}" >> $GITHUB_OUTPUT
|
||||
|
||||
local xcode_cas_path="${HOME}/Library/Developer/Xcode/DerivedData/CompilationCache.noindex"
|
||||
|
||||
if ! [[ -d ${xcode_cas_path} ]] mkdir -p ${xcode_cas_path}
|
||||
|
||||
print "xcodeCasPath=${xcode_cas_path}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/cache/restore@v4
|
||||
id: ccache-cache
|
||||
id: xcode-cache
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: ${{ runner.os }}-ccache-${{ matrix.target }}-${{ needs.check-event.outputs.config }}
|
||||
path: ${{ steps.setup.outputs.xcodeCasPath }}
|
||||
key: ${{ runner.os }}-xcode-${{ matrix.target }}-${{ needs.check-event.outputs.config }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ccache-${{ matrix.target }}-
|
||||
${{ runner.os }}-xcode-${{ matrix.target }}-
|
||||
|
||||
- name: Set Up Code Signing 🔑
|
||||
uses: ./.github/actions/setup-macos-codesigning
|
||||
@@ -129,6 +135,7 @@ jobs:
|
||||
YOUTUBE_CLIENTID_HASH: ${{ secrets.YOUTUBE_CLIENTID_HASH }}
|
||||
YOUTUBE_SECRET: ${{ secrets.YOUTUBE_SECRET }}
|
||||
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
|
||||
XCODE_CAS_PATH: ${{ steps.setup.outputs.xcodeCasPath }}
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
config: ${{ needs.check-event.outputs.config }}
|
||||
@@ -163,10 +170,10 @@ jobs:
|
||||
path: ${{ github.workspace }}/build_macos/obs-studio-*-macos-${{ steps.setup.outputs.cpuName }}-dSYMs.tar.xz
|
||||
|
||||
- uses: actions/cache/save@v4
|
||||
if: github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
|
||||
if: github.event_name != 'pull_request' && steps.xcode-cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ github.workspace }}/.ccache
|
||||
key: ${{ runner.os }}-ccache-${{ matrix.target }}-${{ needs.check-event.outputs.config }}
|
||||
path: ${{ steps.setup.outputs.xcodeCasPath }}
|
||||
key: ${{ runner.os }}-xcode-${{ matrix.target }}-${{ needs.check-event.outputs.config }}
|
||||
|
||||
ubuntu-build:
|
||||
name: Ubuntu 🐧
|
||||
|
||||
Reference in New Issue
Block a user