Skip to content

Commit

Permalink
trying to fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
touchdown committed Dec 27, 2023
1 parent e516cfc commit 6daf2aa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
40 changes: 17 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,15 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15]
java: [temurin@8, temurin@17]
scala: [2.13.12, 2.12.18]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
Expand All @@ -65,27 +57,19 @@ jobs:
publish:
name: Publish Artifacts
needs: [build]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main')
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15]
java: [temurin@8]
java: [temurin@17]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
Expand All @@ -94,12 +78,22 @@ jobs:
java-version: 17
cache: sbt

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

- name: Inflate target directories (2.13.12)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.18)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-2.12.15-${{ matrix.java }}
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }}

- name: Inflate target directories (2.12.15)
- name: Inflate target directories (2.12.18)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
8 changes: 7 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import sbt.addSbtPlugin

ThisBuild / organization := "io.github.touchdown"

ThisBuild / dynverVTagPrefix := true
ThisBuild / dynverSeparator := "-"
// append -SNAPSHOT to version when isSnapshot
ThisBuild / dynverSonatypeSnapshots := true
Expand All @@ -17,7 +18,12 @@ ThisBuild / semanticdbVersion := scalafixSemanticdb.revision

ThisBuild / scalacOptions ++= Seq("-Ywarn-unused")

ThisBuild / githubWorkflowJavaVersions += JavaSpec.temurin("17")
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / crossScalaVersions := Dependencies.Versions.CrossScalaForLib
ThisBuild / githubWorkflowPublishTargetBranches := Seq(
RefPredicate.StartsWith(Ref.Tag("v")),
RefPredicate.Equals(Ref.Branch("main"))
)

val gyremockRuntimeName = "gyremock-runtime"
val akkaGrpcVersion = "2.1.6"
Expand Down
3 changes: 1 addition & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ object Dependencies {
object Versions {
val scala212 = "2.12.18"
val scala213 = "2.13.12"
val scala3 = "3.3.1"

// the order in the list is important because the head will be considered the default.
val CrossScalaForLib: Seq[String] = Seq(scala213, scala3)
val CrossScalaForLib: Seq[String] = Seq(scala213, scala212)
val CrossScalaForPlugin: Seq[String] = Seq(scala212)
}
}

0 comments on commit 6daf2aa

Please sign in to comment.