Skip to content

Commit

Permalink
Add Gradle caching to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa committed Nov 17, 2023
1 parent 2d18288 commit 812946b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
key: gradle-caches-jvm-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }}

- name: Run tests
run: ./gradlew jvmTest

Expand All @@ -32,6 +41,15 @@ jobs:
- name: Install libcurl
run: sudo apt-get install -y libcurl4-gnutls-dev

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
key: gradle-caches-linux-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }}

- name: Run tests
run: ./gradlew linuxX64Test

Expand All @@ -48,6 +66,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
key: gradle-caches-darwin-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }}

- name: Run tests
run: ./gradlew macosX64Test

Expand All @@ -64,6 +91,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
key: gradle-caches-mingw-v0-${{ hashFiles('build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties', 'libs.versions.toml') }}

- name: Run tests
run: ./gradlew.bat mingwX64Test

Expand Down
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
kotlin.code.style=official
kotlin.experimental.tryK2=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx6g
org.gradle.caching=true

kotlin.experimental.tryK2=true

0 comments on commit 812946b

Please sign in to comment.