Skip to content

Commit

Permalink
Merge pull request #32 from ioki-mobility/ci-caching
Browse files Browse the repository at this point in the history
  • Loading branch information
StefMa authored Nov 17, 2023
2 parents 2d18288 + 90067e2 commit d7aa1b5
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
47 changes: 43 additions & 4 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,16 @@ 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
~/.konan
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 @@ -40,14 +59,24 @@ jobs:
if: success() || failure()
with:
check_name: 'Linux Test Reports'
report_paths: '**/build/test-results/nativeTest/TEST-*.xml'
report_paths: '**/build/test-results/linuxX64Test/TEST-*.xml'

test-darwin:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
~/.konan
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 @@ -56,20 +85,30 @@ jobs:
if: success() || failure()
with:
check_name: 'Darwin Test Reports'
report_paths: '**/build/test-results/nativeTest/TEST-*.xml'
report_paths: '**/build/test-results/macosX64Test/TEST-*.xml'

test-mingw:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/jdks
~/.gradle/wrapper
~/.konan
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
run: ./gradlew.bat mingwX64Test --no-daemon

- name: Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
check_name: 'Mingw Test Reports'
report_paths: '**/build/test-results/nativeTest/TEST-*.xml'
report_paths: '**/build/test-results/mingwX64Test/TEST-*.xml'
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 d7aa1b5

Please sign in to comment.