Skip to content

Update sbt-github-actions to 0.24.0 #517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 31 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,37 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.12.19, 2.13.13, 3.3.3]
java: [graalvm-ce-java11@20.3.0]
java: [graal_graalvm-community@17]
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 and Scala
uses: olafurpg/setup-scala@v13
- name: Setup GraalVM (graal_graalvm-community@17)
if: matrix.java == 'graal_graalvm-community@17'
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java }}
java-version: 17
distribution: graalvm-community
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
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

- run: sbt ++${{ matrix.scala }} test docs/mdoc mimaReportBinaryIssues
- run: sbt '++ ${{ matrix.scala }}' clean compile test docs/mdoc mimaReportBinaryIssues

- name: Compress target directories
run: tar cf targets.tar oauth2-jsoniter/jvm/target oauth2/js/target oauth2-cache/js/target oauth2-cache-ce2/target oauth2-cache-zio/target oauth2-jsoniter/js/target target oauth2-cache-scalacache/target mdoc/target oauth2-circe/jvm/target oauth2-cache-cats/target oauth2-cache-future/jvm/target oauth2-circe/js/target oauth2-cache/jvm/target oauth2-cache-future/js/target oauth2/jvm/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar
Expand All @@ -75,33 +71,29 @@ jobs:
matrix:
os: [ubuntu-latest]
scala: [2.13.13]
java: [graalvm-ce-java11@20.3.0]
java: [graal_graalvm-community@17]
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 and Scala
uses: olafurpg/setup-scala@v13
- name: Setup GraalVM (graal_graalvm-community@17)
if: matrix.java == 'graal_graalvm-community@17'
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java }}
java-version: 17
distribution: graalvm-community
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
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: Download target directories (2.12.19)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.12.19-${{ matrix.java }}

Expand All @@ -111,7 +103,7 @@ jobs:
rm targets.tar

- name: Download target directories (2.13.13)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.13.13-${{ matrix.java }}

Expand All @@ -121,7 +113,7 @@ jobs:
rm targets.tar

- name: Download target directories (3.3.3)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-3.3.3-${{ matrix.java }}

Expand All @@ -132,4 +124,4 @@ jobs:

- uses: olafurpg/setup-gpg@v3

- run: sbt ++${{ matrix.scala }} ci-release
- run: sbt ci-release
3 changes: 2 additions & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/mdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,13 @@ jobs:
- uses: olafurpg/setup-scala@v14
with:
java-version: graalvm-ce-java11@20.3.2
- uses: olafurpg/setup-gpg@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: 17
distribution: graalvm-community
components: native-image
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: sbt
- name: Run mdoc
run: sbt 'docs/mdoc'
- uses: actions/setup-node@v1
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ val GraalVM11 = "graalvm-ce-java11@20.3.0"

ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq(Scala212, Scala213, Scala3)
ThisBuild / githubWorkflowJavaVersions := Seq(GraalVM11)
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.graalvm(Graalvm.Distribution("graalvm-community"), "17"))
ThisBuild / githubWorkflowBuild := Seq(
WorkflowStep.Sbt(List("test", "docs/mdoc", "mimaReportBinaryIssues"))
WorkflowStep.Sbt(List("clean", "compile", "test", "docs/mdoc", "mimaReportBinaryIssues"))
) // NOTE those run separately for every ScalaVersion in `crossScalaVersions`

//sbt-ci-release settings
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.3")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.4")
Expand Down
Loading