-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow (ionic): better cache handling for iOS build
- Loading branch information
1 parent
934de95
commit fdde161
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,13 @@ jobs: | |
node-version: '20' | ||
cache: 'npm' | ||
|
||
- uses: hendrikmuhs/[email protected] | ||
name: Xcode Compile Cache | ||
with: | ||
key: ${{ runner.os }}-ccache # makes a unique key w/related restore key internally | ||
create-symlink: true | ||
max-size: 1500M | ||
|
||
- name: Restore node_modules from cache | ||
uses: actions/cache@v4 | ||
with: | ||
|
@@ -54,6 +61,13 @@ jobs: | |
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }} | ||
restore-keys: ${{ runner.os }}-pods- | ||
|
||
- name: Restore build artifacts from cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ios/App/build | ||
key: ${{ runner.os }}-ios-derived-data-${{ hashFiles('ios/Podfile.lock') }} | ||
restore-keys: ${{ runner.os }}-ios-derived-data- | ||
|
||
- name: Build the ionic project for iOS | ||
run: ionic capacitor build ios --prod --no-open | ||
|
||
|
@@ -87,13 +101,21 @@ jobs: | |
- name: Run simulator build command | ||
working-directory: ios/App | ||
run: | | ||
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros | ||
export CCACHE_FILECLONE=true | ||
export CCACHE_DEPEND=true | ||
export CCACHE_INODECACHE=true | ||
export CCACHE_LIMIT_MULTIPLE=0.95 | ||
ccache -s | ||
set -o pipefail | ||
xcodebuild \ | ||
CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ | ||
-scheme App \ | ||
-workspace App.xcworkspace \ | ||
-sdk iphonesimulator \ | ||
-configuration Release \ | ||
-derivedDataPath build | xcpretty | ||
ccache -s | ||
- name: Store build .app file as zip | ||
working-directory: ios/App | ||
|