From 1e8d45cb15ec89feff25323869b1d2fdfeea1987 Mon Sep 17 00:00:00 2001 From: philippus Date: Fri, 23 Aug 2024 19:42:54 -0500 Subject: [PATCH 1/4] Update sbt to 1.10.1 --- project/build.properties | 2 +- src/main/g8/project/build.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/project/build.properties b/project/build.properties index 22af262..ee4c672 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.7.1 +sbt.version=1.10.1 diff --git a/src/main/g8/project/build.properties b/src/main/g8/project/build.properties index 8b9a0b0..ee4c672 100644 --- a/src/main/g8/project/build.properties +++ b/src/main/g8/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.0 +sbt.version=1.10.1 From b40a1451fe2833faab652395f4967e2eb958a994 Mon Sep 17 00:00:00 2001 From: philippus Date: Fri, 23 Aug 2024 19:43:36 -0500 Subject: [PATCH 2/4] Update scala to 2.12.19 --- .github/workflows/ci.yml | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41b1ef0..9e463fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.16] + scala: [2.12.19] java: [temurin@8, temurin@11, temurin@17] runs-on: ${{ matrix.os }} steps: diff --git a/build.sbt b/build.sbt index 76bf32f..2b579e0 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ // This build is for this Giter8 template. // To test the template run `g8` or `g8Test` from the sbt session. // See http://www.foundweekends.org/giter8/testing.html#Using+the+Giter8Plugin for more details. -lazy val scalaVersions = Seq("2.12.16") +lazy val scalaVersions = Seq("2.12.19") lazy val root = project .in(file(".")) .settings( From fa8b0dcfb3d45b06931a8963922e83975dc0ca23 Mon Sep 17 00:00:00 2001 From: philippus Date: Thu, 29 Aug 2024 07:46:26 +0200 Subject: [PATCH 3/4] Update sbt-github-actions to 0.24.0 Regenerate GitHub Actions workflow --- .github/workflows/ci.yml | 28 +++++++++++----------------- .github/workflows/clean.yml | 3 ++- project/sbt-github-actions.sbt | 2 +- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e463fd..88237ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,48 +27,42 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 8 + cache: sbt - name: Setup Java (temurin@11) if: matrix.java == 'temurin@11' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 + cache: sbt - name: Setup Java (temurin@17) if: matrix.java == 'temurin@17' - uses: actions/setup-java@v2 + uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 + cache: sbt - - name: Cache sbt - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.coursier/cache/v1 - ~/.cache/coursier/v1 - ~/AppData/Local/Coursier/Cache/v1 - ~/Library/Caches/Coursier/v1 - key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + - name: Setup sbt + uses: sbt/setup-sbt@v1 - name: Check that workflows are up to date - run: sbt ++${{ matrix.scala }} githubWorkflowCheck + run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck - name: Build project - run: sbt ++${{ matrix.scala }} test + run: sbt '++ ${{ matrix.scala }}' test - run: 'sbt -Dfile.encoding=UTF8 -J-XX:ReservedCodeCacheSize=256M test' diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index 547aaa4..bfc865d 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -17,6 +17,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Delete artifacts + shell: bash {0} run: | # Customize those three lines with your repository and credentials: REPO=${GITHUB_API_URL}/repos/${{ github.repository }} @@ -25,7 +26,7 @@ jobs: ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; } # A temporary file which receives HTTP response headers. - TMPFILE=/tmp/tmp.$$ + TMPFILE=$(mktemp) # An associative array, key: artifact name, value: number of artifacts of that name. declare -A ARTCOUNT diff --git a/project/sbt-github-actions.sbt b/project/sbt-github-actions.sbt index ab75c56..f3481c0 100644 --- a/project/sbt-github-actions.sbt +++ b/project/sbt-github-actions.sbt @@ -1 +1 @@ -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2") +addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0") From ffe9ebb53c125f3d1301d6343c6b854611f65826 Mon Sep 17 00:00:00 2001 From: philippus Date: Thu, 29 Aug 2024 07:47:00 +0200 Subject: [PATCH 4/4] Add java 21 to build matrix --- .github/workflows/ci.yml | 10 +++++++++- build.sbt | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88237ab..7ed47dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [ubuntu-latest] scala: [2.12.19] - java: [temurin@8, temurin@11, temurin@17] + java: [temurin@8, temurin@11, temurin@17, temurin@21] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -55,6 +55,14 @@ jobs: java-version: 17 cache: sbt + - name: Setup Java (temurin@21) + if: matrix.java == 'temurin@21' + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + cache: sbt + - name: Setup sbt uses: sbt/setup-sbt@v1 diff --git a/build.sbt b/build.sbt index 2b579e0..415c155 100644 --- a/build.sbt +++ b/build.sbt @@ -14,7 +14,7 @@ lazy val root = project crossScalaVersions := scalaVersions ) -ThisBuild / githubWorkflowJavaVersions := Seq("8", "11", "17").map(JavaSpec.temurin) +ThisBuild / githubWorkflowJavaVersions := Seq("8", "11", "17", "21").map(JavaSpec.temurin) ThisBuild / githubWorkflowScalaVersions := scalaVersions ThisBuild / githubWorkflowBuildPostamble := Seq( // This runs the template with the default parameters, and runs test within the templated app.