Skip to content

Commit 39cf90e

Browse files
authored
Merge pull request #48 from Philippus/add-java-21
Add java 21 to build matrix
2 parents 4e1f1ff + ffe9ebb commit 39cf90e

File tree

6 files changed

+27
-24
lines changed

6 files changed

+27
-24
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,55 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
scala: [2.12.16]
26-
java: [temurin@8, temurin@11, temurin@17]
25+
scala: [2.12.19]
26+
java: [temurin@8, temurin@11, temurin@17, temurin@21]
2727
runs-on: ${{ matrix.os }}
2828
steps:
2929
- name: Checkout current branch (full)
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
3333

3434
- name: Setup Java (temurin@8)
3535
if: matrix.java == 'temurin@8'
36-
uses: actions/setup-java@v2
36+
uses: actions/setup-java@v4
3737
with:
3838
distribution: temurin
3939
java-version: 8
40+
cache: sbt
4041

4142
- name: Setup Java (temurin@11)
4243
if: matrix.java == 'temurin@11'
43-
uses: actions/setup-java@v2
44+
uses: actions/setup-java@v4
4445
with:
4546
distribution: temurin
4647
java-version: 11
48+
cache: sbt
4749

4850
- name: Setup Java (temurin@17)
4951
if: matrix.java == 'temurin@17'
50-
uses: actions/setup-java@v2
52+
uses: actions/setup-java@v4
5153
with:
5254
distribution: temurin
5355
java-version: 17
56+
cache: sbt
5457

55-
- name: Cache sbt
56-
uses: actions/cache@v2
58+
- name: Setup Java (temurin@21)
59+
if: matrix.java == 'temurin@21'
60+
uses: actions/setup-java@v4
5761
with:
58-
path: |
59-
~/.sbt
60-
~/.ivy2/cache
61-
~/.coursier/cache/v1
62-
~/.cache/coursier/v1
63-
~/AppData/Local/Coursier/Cache/v1
64-
~/Library/Caches/Coursier/v1
65-
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
62+
distribution: temurin
63+
java-version: 21
64+
cache: sbt
65+
66+
- name: Setup sbt
67+
uses: sbt/setup-sbt@v1
6668

6769
- name: Check that workflows are up to date
68-
run: sbt ++${{ matrix.scala }} githubWorkflowCheck
70+
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck
6971

7072
- name: Build project
71-
run: sbt ++${{ matrix.scala }} test
73+
run: sbt '++ ${{ matrix.scala }}' test
7274

7375
- run: 'sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M test'
7476

.github/workflows/clean.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
1919
- name: Delete artifacts
20+
shell: bash {0}
2021
run: |
2122
# Customize those three lines with your repository and credentials:
2223
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
@@ -25,7 +26,7 @@ jobs:
2526
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
2627
2728
# A temporary file which receives HTTP response headers.
28-
TMPFILE=/tmp/tmp.$$
29+
TMPFILE=$(mktemp)
2930
3031
# An associative array, key: artifact name, value: number of artifacts of that name.
3132
declare -A ARTCOUNT

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This build is for this Giter8 template.
22
// To test the template run `g8` or `g8Test` from the sbt session.
33
// See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details.
4-
lazy val scalaVersions = Seq("2.12.16")
4+
lazy val scalaVersions = Seq("2.12.19")
55
lazy val root = project
66
.in(file("."))
77
.settings(
@@ -14,7 +14,7 @@ lazy val root = project
1414
crossScalaVersions := scalaVersions
1515
)
1616

17-
ThisBuild / githubWorkflowJavaVersions := Seq("8", "11", "17").map(JavaSpec.temurin)
17+
ThisBuild / githubWorkflowJavaVersions := Seq("8", "11", "17", "21").map(JavaSpec.temurin)
1818
ThisBuild / githubWorkflowScalaVersions := scalaVersions
1919
ThisBuild / githubWorkflowBuildPostamble := Seq(
2020
// This runs the template with the default parameters, and runs test within the templated app.

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.7.1
1+
sbt.version=1.10.1

project/sbt-github-actions.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
1+
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.8.0
1+
sbt.version=1.10.1

0 commit comments

Comments
 (0)