Skip to content

Commit a70ce0f

Browse files
feat: add caching for NDK and DerivedData in Android and iOS build workflows
1 parent 0488f1a commit a70ce0f

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/build-android.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ jobs:
2424
- name: Setup Android SDK
2525
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407
2626

27+
- name: Cache NDK
28+
id: cache-ndk
29+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
30+
with:
31+
path: ${{ env.ANDROID_HOME }}/ndk/27.3.13750724
32+
key: ${{ runner.os }}-ndk-27.3.13750724
33+
2734
- name: Install NDK
35+
if: steps.cache-ndk.outputs.cache-hit != 'true'
2836
run: echo "y" | ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --install "ndk;27.3.13750724"
2937

3038
- name: Cache Gradle
@@ -34,7 +42,9 @@ jobs:
3442
~/.gradle/caches
3543
~/.gradle/wrapper
3644
example/android/.gradle
37-
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
45+
example/android/app/.cxx
46+
example/android/app/build/intermediates
47+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'android/build.gradle', 'example/android/app/build.gradle') }}
3848
restore-keys: |
3949
${{ runner.os }}-gradle-
4050

.github/workflows/build-ios.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ jobs:
3232
path: example/ios/build/Build/Products/Debug-iphonesimulator/MendixNativeExample.app
3333
key: ios-app-${{ runner.os }}-${{ hashFiles('example/ios/Podfile.lock', 'example/ios/**/*.pbxproj', 'ios/**/*.swift', 'ios/**/*.h', 'ios/**/*.m', 'ios/**/*.mm') }}
3434

35+
- name: Cache DerivedData
36+
if: steps.cache-ios-app.outputs.cache-hit != 'true'
37+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
38+
with:
39+
path: example/ios/build/DerivedData
40+
key: ${{ runner.os }}-derived-data-${{ hashFiles('example/ios/Podfile.lock', 'example/ios/**/*.pbxproj') }}
41+
restore-keys: |
42+
${{ runner.os }}-derived-data-
43+
3544
- name: Cache CocoaPods
3645
if: steps.cache-ios-app.outputs.cache-hit != 'true'
3746
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830

0 commit comments

Comments
 (0)