Skip to content

Commit

Permalink
kotlin 1.9.0-Beta
Browse files Browse the repository at this point in the history
configuration cache testing
  • Loading branch information
whyoleg committed May 24, 2023
1 parent f36b378 commit 24bb7a0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 25 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-kotlin-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ on:

jobs:
build:
name: K2=${{ matrix.kotlin-use-k2 }} ${{ matrix.kotlin-version }} P=${{ matrix.patch-file }}
name: K2=${{ matrix.kotlin-use-k2 }} CC=${{ matrix.configuration-cache-enabled }} K=${{ matrix.kotlin-version }}
strategy:
fail-fast: false
#max-parallel: 2
max-parallel: 2
matrix:
kotlin-version: [
'', # empty means a current project version
'1.8.21',
'[1.9.0-Beta,1.9.0-Beta-9999[',
'1.9.0-Beta',
'[1.9.20-dev,1.9.20-dev-9999['
]
kotlin-use-k2: [ 'false', 'true' ]
configuration-cache-enabled: [ false, true ]
exclude:
# it's possible to use K2 only starting from kotlin 1.9
- kotlin-use-k2: 'true'
Expand All @@ -32,4 +33,5 @@ jobs:
kotlin-version: ${{ matrix.kotlin-version }}
kotlin-use-k2: ${{ matrix.kotlin-use-k2 }}
patch-file: './.github/patches/K_N_workaround.patch'
configuration-cache-enabled: ${{ matrix.configuration-cache-enabled }}
run-compatibility-tests: false
57 changes: 38 additions & 19 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ on:
kotlin-use-k2:
description: Use or not K2
type: string
required: false
default: 'false'
cache-disabled:
description: When 'true', all caching is disabled. No entries will be written to or read from the cache.
type: boolean
required: false
default: false
patch-file:
description: Path to git patch to apply
type: string
configuration-cache-enabled:
description: When `true`, will use configuration cache
type: boolean
default: false
run-compatibility-tests:
description: When `true`, will run compatibility tests
type: boolean
required: false
default: true

workflow_dispatch:
Expand All @@ -31,19 +33,21 @@ on:
kotlin-use-k2:
description: Use or not K2
type: string
required: false
default: 'false'
cache-disabled:
description: When 'true', all caching is disabled. No entries will be written to or read from the cache.
type: boolean
required: false
default: false
patch-file:
description: Path to git patch to apply
type: string
configuration-cache-enabled:
description: When `true`, will use configuration cache
type: boolean
default: false
run-compatibility-tests:
description: When `true`, will run compatibility tests
type: boolean
required: false
default: true

env:
Expand All @@ -65,6 +69,10 @@ jobs:
with:
cache-disabled: ${{ inputs.cache-disabled }}

- id: configuration-cache
if: ${{ inputs.configuration-cache-enabled }}
run: echo "ARGS=--configuration-cache" >> $GITHUB_OUTPUT

- if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
Expand All @@ -77,11 +85,10 @@ jobs:
arguments: |
check
--scan
--continue
--configuration-cache
--exclude-task
jsPublicPackageJson
--continue
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}"
compatibility-generate:
if: ${{ inputs.run-compatibility-tests }}
Expand All @@ -99,6 +106,11 @@ jobs:
with:
cache-disabled: ${{ inputs.cache-disabled }}
cache-read-only: true

- id: configuration-cache
if: ${{ inputs.configuration-cache-enabled }}
run: echo "ARGS=--configuration-cache" >> $GITHUB_OUTPUT

- name: Run tests
uses: gradle/gradle-build-action@v2
with:
Expand All @@ -108,10 +120,9 @@ jobs:
-Ptesttool.instanceId=${{ matrix.os }}
--scan
--continue
--configuration-cache
--exclude-task
jsPublicPackageJson
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}"
- name: ZIP test-tool-storage (windows)
if: ${{ always() && matrix.os == 'windows-latest' }}
Expand Down Expand Up @@ -145,6 +156,10 @@ jobs:
cache-disabled: ${{ inputs.cache-disabled }}
cache-read-only: true

- id: configuration-cache
if: ${{ inputs.configuration-cache-enabled }}
run: echo "ARGS=--configuration-cache" >> $GITHUB_OUTPUT

- name: Download test-tool-storage ZIP
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -177,10 +192,9 @@ jobs:
-Ptesttool.instanceId=${{ matrix.os }}
--scan
--continue
--configuration-cache
--exclude-task
jsPublicPackageJson
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}"
# for windows, we skip jsNodeTest task, because for some reason it timeouts
- name: Run tests (windows)
if: matrix.os == 'windows-latest'
Expand All @@ -192,12 +206,11 @@ jobs:
-Ptesttool.instanceId=${{ matrix.os }}
--scan
--continue
--configuration-cache
--exclude-task
jsPublicPackageJson
--exclude-task
jsNodeTest
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}"
build-project:
name: Build project
Expand All @@ -214,6 +227,10 @@ jobs:
with:
cache-disabled: ${{ inputs.cache-disabled }}

- id: configuration-cache
if: ${{ inputs.configuration-cache-enabled }}
run: echo "ARGS=--configuration-cache" >> $GITHUB_OUTPUT

- if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
Expand All @@ -230,3 +247,5 @@ jobs:
--continue
-Pskip.test
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}"
4 changes: 1 addition & 3 deletions build-parameters/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ buildParameters {
}
}
}
string("useKotlin") {
fromEnvironment("KOTLIN_VERSION_OVERRIDE")
}
string("useKotlin")
group("skip") {
bool("test") {
description.set("Skip running tests")
Expand Down

0 comments on commit 24bb7a0

Please sign in to comment.