Skip to content

Commit

Permalink
Merge pull request #35 from AVSystem/2.13.14
Browse files Browse the repository at this point in the history
Scala 2.13.14
  • Loading branch information
ddworak authored May 13, 2024
2 parents 27b7f16 + ea813a9 commit b22a22d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 62 deletions.
80 changes: 37 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,42 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.13]
java: [temurin@11]
scala: [2.13.14]
java: [temurin@17, temurin@21]
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@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: Cache sbt
uses: actions/cache@v2
- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
uses: actions/setup-java@v4
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') }}
distribution: temurin
java-version: 21
cache: sbt

- 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

- name: Compress target directories
run: tar cf targets.tar scex-macros/target scex-core/target scex-test/target scex-java-test/target scex-util/target 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 @@ -73,40 +70,37 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.13]
java: [temurin@11]
scala: [2.13.14]
java: [temurin@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 (temurin@11)
if: matrix.java == 'temurin@11'
uses: actions/setup-java@v2
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17
cache: sbt

- name: Cache sbt
uses: actions/cache@v2
- name: Setup Java (temurin@21)
if: matrix.java == 'temurin@21'
uses: actions/setup-java@v4
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.13.13)
uses: actions/download-artifact@v2
distribution: temurin
java-version: 21
cache: sbt

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

- name: Inflate target directories (2.13.13)
- name: Inflate target directories (2.13.14)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -116,4 +110,4 @@ jobs:
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
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
29 changes: 13 additions & 16 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name := "scex"

inThisBuild(Seq(
organization := "com.avsystem.scex",
scalaVersion := "2.13.13",
scalaVersion := "2.13.14",

githubWorkflowTargetTags ++= Seq("v*"),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11")),
githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"), JavaSpec.temurin("21")),
githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))),

githubWorkflowPublish := Seq(WorkflowStep.Sbt(
Expand All @@ -21,15 +21,15 @@ inThisBuild(Seq(

val CompileAndTest = "compile->compile;test->test"

val parserCombinatorsVersion = "1.1.2"
val avsCommonsVersion = "2.14.0"
val parserCombinatorsVersion = "2.4.0"
val avsCommonsVersion = "2.16.0"
val jettyVersion = "9.4.54.v20240208" // Tests only
val vaadinVersion = "6.8.18" // Tests only
val slf4jVersion = "2.0.12"
val logbackVersion = "1.4.14" // Tests only
val slf4jVersion = "2.0.13"
val logbackVersion = "1.5.6" // Tests only
val commonsLang3Version = "3.14.0"
val commonsCodecVersion = "1.16.1"
val guavaVersion = "33.0.0-jre"
val commonsCodecVersion = "1.17.0"
val guavaVersion = "33.2.0-jre"
val commonsNetVersion = "3.10.0"
val jodaTimeVersion = "2.12.7"
val scalatestVersion = "3.2.18"
Expand All @@ -44,8 +44,7 @@ lazy val subprojectSettings = Seq(
crossVersion := CrossVersion.full,

javacOptions ++= Seq(
"-source", "1.8",
"-target", "1.8",
"--release", "17",
"-parameters"
),

Expand All @@ -61,12 +60,10 @@ lazy val subprojectSettings = Seq(
"-Xlint:-missing-interpolator,-adapted-args,-unused,_"
),

scalacOptions ++= {
if (scalaBinaryVersion.value == "2.13") Seq(
"-Xnon-strict-patmat-analysis",
"-Xlint:-strict-unsealed-patmat"
) else Seq.empty
},
scalacOptions ++= Seq(
"-Xnon-strict-patmat-analysis",
"-Xlint:-strict-unsealed-patmat"
),

sonatypeProfileName := "com.avsystem",
publishTo := sonatypePublishToBundle.value,
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
logLevel := Level.Warn

addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0")

0 comments on commit b22a22d

Please sign in to comment.