Skip to content

Commit

Permalink
update build (#107)
Browse files Browse the repository at this point in the history
* update build

* Update integration-tests-kafka.yml

* Update SlickProjectionImpl.scala

* rework resolvers
  • Loading branch information
pjfanning authored Feb 12, 2024
1 parent 9e51b48 commit 04be28f
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 57 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/integration-tests-cassandra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 8, scala-version: 2.13.11, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13.11, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12.18, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12.18, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.13, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-tests-jdbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 8, scala-version: 2.13.11, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13.11, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12.18, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12.18, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.13, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-tests-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 8, scala-version: 2.13.11, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13.11, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12.18, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12.18, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.13, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/integration-tests-slick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 8, scala-version: 2.13.11, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13.11, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12.18, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12.18, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.13, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 8, scala-version: 2.13.11, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13.11, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12.18, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12.18, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 3.3.1, sbt-opts: '' }
- { java-version: 11, scala-version: 3.3.1, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.13, sbt-opts: '' }
- { java-version: 11, scala-version: 2.13, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 2.12, sbt-opts: '' }
- { java-version: 11, scala-version: 2.12, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
- { java-version: 8, scala-version: 3.3, sbt-opts: '' }
- { java-version: 11, scala-version: 3.3, sbt-opts: '-J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler' }
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ sourceDistName := "apache-pekko-projection"
sourceDistIncubating := true

ThisBuild / pekkoInlineEnabled := false
// we want to be able to test with snapshot versions of Pekko dependencies
ThisBuild / resolvers += Resolver.ApacheMavenSnapshotsRepo
ThisBuild / reproducibleBuildsCheckResolver := Resolver.ApacheMavenStagingRepo

lazy val core =
Expand Down
11 changes: 6 additions & 5 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import sbt._

object Dependencies {

val Scala213 = "2.13.11"
val Scala213 = "2.13.12"
val Scala212 = "2.12.18"
val Scala3 = "3.3.1"
val Scala2Versions = Seq(Scala213, Scala212)
Expand All @@ -28,14 +28,15 @@ object Dependencies {
val pekko = PekkoCoreDependency.version
val pekkoPersistenceJdbc = "1.0.0"
val pekkoPersistenceCassandra = "1.0.0"
val connectors = "1.0.1"
val connectorsKafka = sys.props.getOrElse("build.connectors.kafka.version", "1.0.0")
val connectors = PekkoConnectorsDependency.version
val connectorsKafka = PekkoConnectorsKafkaDependency.version
val slick = "3.3.3"
val scalaTest = "3.2.14"
val testContainers = "1.15.3"
val junit = "4.13.2"
val h2Driver = "2.2.220"
val h2Driver = "2.2.224"
val jackson = "2.14.3" // this should match the version of jackson used by pekko-serialization-jackson
val logback = "1.2.13"
}

object Compile {
Expand Down Expand Up @@ -78,7 +79,7 @@ object Dependencies {
val msSQLServerDriver = "com.microsoft.sqlserver" % "mssql-jdbc" % "7.4.1.jre8" % allTestConfig
val oracleDriver = "com.oracle.ojdbc" % "ojdbc8" % "19.3.0.0" % allTestConfig

val logback = "ch.qos.logback" % "logback-classic" % "1.2.11" % allTestConfig
val logback = "ch.qos.logback" % "logback-classic" % Versions.logback % allTestConfig

val cassandraContainer =
"org.testcontainers" % "cassandra" % Versions.testContainers % allTestConfig
Expand Down
25 changes: 25 additions & 0 deletions project/PekkoConnectorsDependency.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pekko.projections

import com.github.pjfanning.pekkobuild.PekkoDependency

object PekkoConnectorsDependency extends PekkoDependency {
override val checkProject: String = "pekko-connectors-cassandra"
override val module: Option[String] = Some("connectors")
override val currentVersion: String = "1.0.2"
}
25 changes: 25 additions & 0 deletions project/PekkoConnectorsKafkaDependency.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.pekko.projections

import com.github.pjfanning.pekkobuild.PekkoDependency

object PekkoConnectorsKafkaDependency extends PekkoDependency {
override val checkProject: String = "pekko-connectors-kafka-testkit"
override val module: Option[String] = Some("connectors.kafka")
override val currentVersion: String = "1.0.0"
}
29 changes: 0 additions & 29 deletions project/PekkoSnapshotRepository.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private[projection] class SlickProjectionImpl[Offset, Envelope, P <: JdbcProfile
databaseConfig.db.run(offsetStore.saveOffset(projectionId, offset)).map(_ => Done)

private[projection] def newRunningInstance(): RunningProjection =
new SlickRunningProjection(RunningProjection.withBackoff(() => mappedSource(), settings), this)
new SlickRunningProjection(RunningProjection.withBackoff(() => this.mappedSource(), settings), this)

}

Expand Down

0 comments on commit 04be28f

Please sign in to comment.