Skip to content

Commit 79da4a9

Browse files
committed
Speed up validation workflow with configuration cache
1 parent 10673ce commit 79da4a9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/validation.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
path: ~/.konan
4747
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
4848
- name: JVM & linuxX64 tests
49-
run: ./gradlew --stacktrace clean jvmTest linuxX64Test
49+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache jvmTest linuxX64Test
5050

5151
windows:
5252
name: Windows (mingwX64)
@@ -67,7 +67,7 @@ jobs:
6767
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
6868
- name: mingwX64 tests
6969
shell: bash
70-
run: ./gradlew --stacktrace mingwX64Test
70+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache compileKotlinMingwX64 linkDebugTestMingwX64
7171

7272
macos:
7373
name: macOS (macosArm64 only)
@@ -87,7 +87,7 @@ jobs:
8787
path: ~/.konan
8888
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/libs.versions.toml') }}
8989
- name: macOS tests
90-
run: ./gradlew --stacktrace macosArm64Test
90+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache macosArm64Test
9191

9292
static-analysis:
9393
name: Lint & API checks
@@ -103,18 +103,18 @@ jobs:
103103
- uses: gradle/actions/setup-gradle@v4
104104

105105
- name: detekt
106-
run: ./gradlew --stacktrace detekt
106+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache detekt
107107

108108
- name: ktlintCheck (if present)
109109
run: |
110110
if ./gradlew -q tasks --all | grep -qE '^ktlintCheck\s'; then
111-
./gradlew --stacktrace ktlintCheck
111+
./gradlew --stacktrace --build-cache --parallel --configuration-cache ktlintCheck
112112
else
113113
echo "ktlintCheck not found, skipping"
114114
fi
115115
116116
- name: checkLegacyAbi
117-
run: ./gradlew --stacktrace checkLegacyAbi
117+
run: ./gradlew --stacktrace --build-cache --parallel --configuration-cache checkLegacyAbi
118118

119119
docs:
120120
name: Dokka (artifact)
@@ -131,7 +131,7 @@ jobs:
131131
- name: Generate Dokka HTML
132132
run: |
133133
if ./gradlew -q tasks --all | grep -qE '^dokkaHtml\s'; then
134-
./gradlew --stacktrace dokkaHtml
134+
./gradlew --stacktrace --build-cache --parallel --configuration-cache dokkaHtml
135135
else
136136
echo "dokkaHtml not found, skipping" && exit 0
137137
fi

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ kotlin.code.style=official
22
org.gradle.jvmargs=-Xmx4G
33
org.gradle.parallel=true
44
org.gradle.caching=true
5+
org.gradle.configuration-cache=true
56
kotlin.native.cacheKind=static
67
kotlin.version=1.9.20

0 commit comments

Comments
 (0)