@@ -42,15 +42,12 @@ jobs:
4242 cache-dependency-path : |
4343 gradle/libs.versions.toml
4444 gradle/wrapper/gradle-wrapper.properties
45- - name : Cache Kotlin/Native prebuilt
46- uses : actions/cache@v4
45+ - name : Set up Kotlin/Native
46+ uses : ObserverOfTime/setup-konan-action@v1
4747 with :
48- path : ${{runner.tool_cache}}/konan/kotlin-native-prebuilt-*
49- key : konan-${{runner.os}}-prebuilt-1.9
48+ kotlin_version : 2.1.21
5049 - name : Generate files
5150 run : ./gradlew --no-daemon generateGrammarFiles
52- env :
53- KONAN_DATA_DIR : ${{runner.tool_cache}}/konan
5451 - name : Upload artifact
5552 uses : actions/upload-artifact@v4
5653 with :
@@ -113,14 +110,20 @@ jobs:
113110 cache-dependency-path : |
114111 gradle/libs.versions.toml
115112 gradle/wrapper/gradle-wrapper.properties
113+ - name : Set up Kotlin/Native
114+ uses : ObserverOfTime/setup-konan-action@v1
115+ with :
116+ kotlin_version : 2.1.21
116117 - name : Set up cross compilation
117- run : sudo apt-get install -qy {binutils,gcc}-aarch64-linux-gnu
118118 if : matrix.platform == 'Linux'
119- - name : Restore Kotlin/Native prebuilt
120- uses : actions/cache/restore@v4
121- with :
122- path : ${{runner.tool_cache}}/konan/kotlin-native-prebuilt-*
123- key : konan-${{runner.os}}-prebuilt-1.9
119+ run : |-
120+ sudo apt-get update
121+ sudo apt-get install -qy {binutils,gcc}-aarch64-linux-gnu
122+ - name : Set up Ninja
123+ if : matrix.platform == 'Android'
124+ run : |-
125+ sudo apt-get update
126+ sudo apt-get install -qy ninja-build
124127 - name : Download generated files
125128 uses : actions/download-artifact@v4
126129 with :
@@ -131,30 +134,8 @@ jobs:
131134 run : .github/scripts/build-jni.${{matrix.os == 'windows-latest' && 'ps1' || 'sh'}}
132135 env :
133136 CMAKE_INSTALL_LIBDIR : lib/${{matrix.lib_platform}}/${{matrix.lib_arch}}
134- - name : Cache Kotlin/Native dependencies
135- id : cache-dependencies
136- uses : actions/cache@v4
137- if : matrix.platform != 'JVM' && matrix.platform != 'Android'
138- with :
139- path : ${{runner.tool_cache}}/konan/dependencies
140- key : konan-${{runner.os}}-dependencies
141- - name : Download Kotlin/Native dependencies
142- if : matrix.platform == 'macOS/iOS' && steps.cache-dependencies.outputs.cache-hit != 'true'
143- run : |-
144- mkdir -p "$RUNNER_TOOL_CACHE/konan/dependencies"
145- curl -LSs https://download-cdn.jetbrains.com/kotlin/native/$DEP.tar.gz | \
146- tar -xzf - -C "$RUNNER_TOOL_CACHE/konan/dependencies"
147- env :
148- DEP : apple-llvm-20200714-macos-aarch64-essentials
149- - name : Set up Ninja
150- if : matrix.platform == 'Android'
151- run : |-
152- sudo apt-get update
153- sudo apt-get install -y ninja-build
154137 - name : Run tests
155138 run : ./gradlew --no-daemon ${{matrix.targets}}
156- env :
157- KONAN_DATA_DIR : ${{runner.tool_cache}}/konan
158139 - name : Report test results
159140 uses : mikepenz/action-junit-report@v5
160141 if : matrix.platform == 'JVM' && !cancelled()
0 commit comments