Skip to content

Commit

Permalink
test configuration cache
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg committed Aug 8, 2023
1 parent a69730c commit 00563d1
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 35 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/build-kotlin-eap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,6 @@ on:
- kotlin-eap/*

jobs:
build:
name: Kotlin=${{ matrix.kotlin-version }}
strategy:
fail-fast: false
matrix:
kotlin-version: [ '' ] # empty means a current project version
include:
- kotlin-version: '[1.9.20-dev,1.9.20-dev-9999['
patch-file: './.github/patches/kotlin_1_9_20.patch'
uses: ./.github/workflows/run-build.yml
with:
kotlin-version: ${{ matrix.kotlin-version }}
patch-file: ${{ matrix.patch-file }}
cache-disabled: true
skip-tests: false

build-k2:
name: Kotlin/K2=${{ matrix.kotlin-version }}
strategy:
fail-fast: false
matrix:
kotlin-version: [ '' ] # empty means a current project version
include:
- kotlin-version: '[1.9.20-dev,1.9.20-dev-9999['
patch-file: './.github/patches/kotlin_1_9_20.patch'
uses: ./.github/workflows/run-build.yml
with:
kotlin-version: ${{ matrix.kotlin-version }}
patch-file: ${{ matrix.patch-file }}
cache-disabled: true
skip-tests: false
kotlin-use-k2: true

build-cc:
name: Kotlin/CC=${{ matrix.kotlin-version }}
strategy:
Expand Down
71 changes: 69 additions & 2 deletions .github/workflows/run-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ on:
default: 'true'

jobs:
build:
build-no-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -81,7 +81,74 @@ jobs:
build
publishToMavenLocal
--continue
-Pskip.test=${{ inputs.skip-tests }}
-Pskip.test=true
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}
check-no-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
steps:
- uses: actions/checkout@v3
- run: git apply ${{ inputs.patch-file }}
if: inputs.patch-file != ''
- uses: ./.github/actions/setup-gradle
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:
release: false
install: mingw-w64-x86_64-openssl

- uses: gradle/gradle-build-action@v2
with:
arguments: |
check
--continue
-Pskip.test=true
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}
check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
steps:
- uses: actions/checkout@v3
- run: git apply ${{ inputs.patch-file }}
if: inputs.patch-file != ''
- uses: ./.github/actions/setup-gradle
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:
release: false
install: mingw-w64-x86_64-openssl

- uses: gradle/gradle-build-action@v2
with:
arguments: |
check
--continue
-Pkotlin.experimental.tryK2=${{ inputs.kotlin-use-k2 }}
-PuseKotlin=${{ inputs.kotlin-version }}
${{ steps.configuration-cache.outputs.ARGS }}

0 comments on commit 00563d1

Please sign in to comment.