Skip to content

Commit

Permalink
Cache native compiler in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Jan 16, 2022
1 parent c8f14dd commit bb1dd77
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: eskatos/gradle-command-action@v2
- name: Cache Kotlin Native Compiler
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-konan-
- uses: gradle/gradle-build-action@v2
with:
arguments: ${{matrix.TEST_TASK}} --stacktrace
- name: Bundle the build report
Expand All @@ -42,7 +48,13 @@ jobs:
- uses: actions/checkout@v2
- name: Fetch git tags
run: git fetch origin +refs/tags/*:refs/tags/*
- uses: eskatos/gradle-command-action@v2
- name: Cache Kotlin Native Compiler
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-konan-
- uses: gradle/gradle-build-action@v2
with:
arguments: publish --stacktrace -PinferVersion=true

Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@ jobs:
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: eskatos/gradle-command-action@v1
- name: Cache Kotlin Native Compiler
uses: actions/cache@v2
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-konan-
- uses: actions/setup-java@v1
with:
java-version: 11
- uses: gradle/gradle-build-action@v2
with:
dependencies-cache-enabled: true
arguments: ${{matrix.TEST_TASK}} --stacktrace
- name: Bundle the build report
if: failure()
Expand Down

0 comments on commit bb1dd77

Please sign in to comment.