Skip to content

Commit

Permalink
upgrade ci plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jan 30, 2023
1 parent 892e394 commit f8788da
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 40 deletions.
64 changes: 29 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ on:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


concurrency:
group: ${{ github.workflow }} @ ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.11.12, 2.12.17, 2.13.10]
scala: [2.11, 2.12, 2.13]
java: [zulu@8]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Java (zulu@8)
id: setup-java-zulu-8
if: matrix.java == 'zulu@8'
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
cache: sbt

- name: Cache sbt
uses: actions/cache@v3
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: sbt update
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- name: Check that workflows are up to date
run: sbt githubWorkflowCheck

- run: sbt '++${{ matrix.scala }}' test
- run: sbt '++ ${{ matrix.scala }}' test

- name: Make target directories
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
Expand Down Expand Up @@ -88,50 +88,44 @@ jobs:
fetch-depth: 0

- name: Setup Java (zulu@8)
id: setup-java-zulu-8
if: matrix.java == 'zulu@8'
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 8
cache: sbt

- name: Cache sbt
uses: actions/cache@v3
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: Download target directories (2.11.12)
- name: sbt update
if: matrix.java == 'zulu@8' && steps.setup-java-zulu-8.outputs.cache-hit == 'false'
run: sbt '++ ${{ matrix.scala }}' reload +update

- name: Download target directories (2.11)
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.11.12
name: target-${{ matrix.os }}-${{ matrix.java }}-2.11

- name: Inflate target directories (2.11.12)
- name: Inflate target directories (2.11)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.17)
- name: Download target directories (2.12)
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12

- name: Inflate target directories (2.12.17)
- name: Inflate target directories (2.12)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.10)
- name: Download target directories (2.13)
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.10
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13

- name: Inflate target directories (2.13.10)
- name: Inflate target directories (2.13)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -142,4 +136,4 @@ jobs:
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: sbt '++${{ matrix.scala }}' ci-release
run: sbt '++ ${{ matrix.scala }}' ci-release
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ThisBuild / scalaVersion := "2.13.10"

ThisBuild / crossScalaVersions := Seq("2.11.12", "2.12.17", "2.13.10")

val jacksonVersion = "2.14.0"
val jacksonVersion = "2.14.2"

//resolvers ++= Resolver.sonatypeOssRepos("snapshots")

Expand All @@ -17,7 +17,7 @@ libraryDependencies ++= Seq(
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion,
"org.slf4j" % "slf4j-api" % "2.0.3",
"org.scalatest" %% "scalatest" % "3.2.14" % Test,
"org.scalatest" %% "scalatest" % "3.2.15" % Test,
"org.slf4j" % "slf4j-simple" % "2.0.3" % Test,
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-csv" % jacksonVersion % Test
)
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.7.3
sbt.version = 1.8.2
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M6")
addSbtPlugin("org.typelevel" % "sbt-typelevel-sonatype-ci-release" % "0.5.0-M9")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")

addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")

0 comments on commit f8788da

Please sign in to comment.