Skip to content

Commit a328e9a

Browse files
authored
ci: Cache konan on Github actions (#140)
1 parent aea4cb3 commit a328e9a

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/workflows/build_and_test.yml

+8
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v4
21+
- name: Get Kotlin version
22+
id: get-kotlin-version
23+
run: |
24+
echo "version=$(cat gradle/libs.versions.toml | grep -m1 kotlin | cut -d'=' -f2 - | tr -d ' "')" >> $GITHUB_OUTPUT
25+
- uses: actions/cache@v4
26+
with:
27+
key: konan-${{ runner.os }}-${{ steps.get-kotlin-version.outputs.version }}
28+
path: ~/.konan
2129
- name: Set up JDK 11
2230
uses: actions/setup-java@v4
2331
with:

.github/workflows/release.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ jobs:
1515
name: Build and publish release
1616
runs-on: ubuntu-24.04
1717
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
18+
- uses: actions/checkout@v4
19+
- name: Get Kotlin version
20+
id: get-kotlin-version
21+
run: |
22+
echo "version=$(cat gradle/libs.versions.toml | grep -m1 kotlin | cut -d'=' -f2 - | tr -d ' "')" >> $GITHUB_OUTPUT
23+
- uses: actions/cache@v4
24+
with:
25+
key: konan-${{ runner.os }}-${{ steps.get-kotlin-version.outputs.version }}
26+
path: ~/.konan
2027
- name: Set up JDK
2128
uses: actions/setup-java@v4
2229
with:

0 commit comments

Comments
 (0)