Skip to content

Commit 852a97b

Browse files
authored
build: improve compiler bridge caching in github actions (#292)
1 parent c197b5a commit 852a97b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: .github/workflows/validate.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,16 @@ jobs:
5656
with:
5757
fetch-depth: 0
5858

59-
- name: Checkout GitHub merge
60-
if: github.event.pull_request
61-
run: |-
62-
git fetch origin pull/${{ github.event.pull_request.number }}/merge:scratch
63-
git checkout scratch
64-
6559
- name: Set up JDK ${{ matrix.jdk-version }}
6660
uses: olafurpg/setup-scala@v10
6761
with:
6862
java-version: adopt@${{ matrix.jdk-version }}
6963

7064
- name: Cache Coursier cache
7165
uses: coursier/cache-action@v5
66+
with:
67+
# add marker for the target scala-version, so that compiler bridge can be cached
68+
extraKey: ${{ matrix.jdk-version }}-${{ matrix.scala-version }}
7269

7370
- name: Compile and test for JDK ${{ matrix.jdk-version }}, Scala ${{ matrix.scala-version }}
7471
run: sbt -J-XX:ReservedCodeCacheSize=256M ++${{ matrix.scala-version }} test
@@ -92,6 +89,9 @@ jobs:
9289

9390
- name: Cache Coursier cache
9491
uses: coursier/cache-action@v5
92+
with:
93+
# add marker that this build uses cross building, so hopefully all compiler bridges will be cached
94+
extraKey: cross
9595

9696
- name: Publish
9797
run: sbt ci-release

0 commit comments

Comments
 (0)