Skip to content

Commit df69b9f

Browse files
committed
feat: add workflow for warming Konan cache on push to develop and main
1 parent 21c6e6d commit df69b9f

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Warm Konan Cache"
2+
3+
on:
4+
push:
5+
branches: [ develop, main ]
6+
paths:
7+
- gradle.properties
8+
- gradle/libs.versions.toml
9+
10+
jobs:
11+
warm-konan-cache:
12+
runs-on: macos-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v6
16+
17+
- name: Setup Java and Gradle
18+
uses: ./.github/actions/setup-java-gradle
19+
20+
- name: Restore Konan cache
21+
id: konan-cache
22+
uses: actions/cache/restore@v4
23+
with:
24+
path: ~/.konan
25+
key: ${{ runner.os }}-${{ runner.arch }}-konan-${{ hashFiles('gradle.properties', 'gradle/libs.versions.toml') }}
26+
27+
- name: Download Kotlin/Native toolchain
28+
if: steps.konan-cache.outputs.cache-hit != 'true'
29+
run: ./gradlew :logic:compileKotlinIosSimulatorArm64 -PUSE_UNIFIED_CORE_CRYPTO=true
30+
env:
31+
GITHUB_USER: ${{ github.actor }}
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Save Konan cache
35+
if: always() && steps.konan-cache.outputs.cache-hit != 'true'
36+
uses: actions/cache/save@v4
37+
with:
38+
path: ~/.konan
39+
key: ${{ steps.konan-cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)