Skip to content
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

Scala 2.12 and sbt updates #6328

Closed
wants to merge 10 commits into from
Closed
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
8 changes: 4 additions & 4 deletions centaur/test_cromwell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ cd "${RUN_DIR}"
TEST_STATUS="failed"

if [[ "${CENTAUR_SBT_COVERAGE}" == "true" ]]; then
sbt -Dsbt.supershell=false --warn coverage centaur/it:compile
CP=$(sbt -no-colors --error coverage "export centaur/it:dependencyClasspath")
sbt -Dsbt.supershell=false --warn coverage centaur/IntegrationTest/compile
CP=$(sbt -no-colors --error coverage "export centaur/IntegrationTest/dependencyClasspath")
else
sbt -Dsbt.supershell=false --warn centaur/it:compile
CP=$(sbt -no-colors --error "export centaur/it:dependencyClasspath")
sbt -Dsbt.supershell=false --warn centaur/IntegrationTest/compile
CP=$(sbt -no-colors --error "export centaur/IntegrationTest/dependencyClasspath")
fi

# Add the it-classes folder to the classpath to ensure logback configuration files are picked up.
Expand Down
2 changes: 1 addition & 1 deletion codegen_java/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val root = (project in file(".")).
Seq(organization := "org.broadinstitute.cromwell",
name := "cromwell-client",
version := createVersion("0.1"),
scalaVersion := "2.12.12", // scala-steward:off (CROM-6777) - 2.12.13 blocked by duplicate import of nowarn
scalaVersion := "2.12.14",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Compile / packageDoc / publishArtifact := false,
Expand Down
2 changes: 1 addition & 1 deletion codegen_java/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.9
sbt.version=1.5.5
129 changes: 71 additions & 58 deletions project/Dependencies.scala

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions project/Publishing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Publishing {
val artifact: File = assembly.value
val artifactTargetPath = s"/app/${artifact.name}"
val projectName = name.value
val additionalDockerInstr: Seq[Instruction] = dockerCustomSettings.value
val additionalDockerInstr: Seq[Instruction] = (dockerCustomSettings ?? Nil).value

new Dockerfile {
from("us.gcr.io/broad-dsp-gcr-public/base/jre:11-debian")
Expand Down Expand Up @@ -100,8 +100,7 @@ object Publishing {
docker / buildOptions := BuildOptions(
cache = false,
removeIntermediateContainers = BuildOptions.Remove.Always
),
ThisBuild / dockerCustomSettings := Nil // setting the default value
)
)

def dockerPushSettings(pushEnabled: Boolean): Seq[Setting[_]] = {
Expand Down
10 changes: 4 additions & 6 deletions project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,12 @@ object Settings {
lazy val assemblySettings = Seq(
assembly / assemblyJarName := name.value + "-" + version.value + ".jar",
assembly / test := {},
assembly / assemblyMergeStrategy := customMergeStrategy.value,
assembly / logLevel :=
sys.env.get("CROMWELL_SBT_ASSEMBLY_LOG_LEVEL").flatMap(Level.apply).getOrElse((assembly / logLevel).value)
assembly / assemblyMergeStrategy := customMergeStrategy.value
)

val Scala2_12Version = "2.12.12" // scala-steward:off (CROM-6777) - 2.12.13 blocked by duplicate import of nowarn
val ScalaVersion: String = Scala2_12Version
val sharedSettings: Seq[Setting[_]] =
val Scala2_12Version = "2.12.14"
private val ScalaVersion: String = Scala2_12Version
private val sharedSettings: Seq[Setting[_]] =
cromwellVersionWithGit ++ publishingSettings ++ List(
organization := "org.broadinstitute",
scalaVersion := ScalaVersion,
Expand Down
12 changes: 8 additions & 4 deletions project/Testing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ object Testing {
spanScaleFactor,
"-W",
"300",
"300",
"300"
)

/** Run minnie-kenny only once per sbt invocation. */
Expand Down Expand Up @@ -101,7 +101,11 @@ object Testing {
CromwellBenchmarkTest / testFrameworks += new TestFramework("org.scalameter.ScalaMeterFramework"),
// Don't execute benchmarks in parallel
CromwellBenchmarkTest / parallelExecution := false,
// Make sure no secrets are commited to git
// Until we move away from Travis do not execute ANY tests in parallel (see also Settings.sharedSettings)
Test / parallelExecution := false,
// Since parallelExecution is off do not buffer test results
Test / logBuffered := false,
// Make sure no secrets are committed to git
minnieKenny := {
val log = streams.value.log
val args = spaceDelimited("<arg>").parsed
Expand All @@ -110,10 +114,10 @@ object Testing {
Test / test := {
minnieKenny.toTask("").value
(Test / test).value
},
}
)

val integrationTestSettings = List(
private val integrationTestSettings = List(
libraryDependencies ++= testDependencies.map(_ % IntegrationTest)
) ++ itSettings

Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# scala-steward:off
sbt.version=1.4.9
sbt.version=1.5.5
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.8.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2")
2 changes: 1 addition & 1 deletion project/project/build.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# scala-steward:off
sbt.version=1.4.9
sbt.version=1.5.5
2 changes: 1 addition & 1 deletion publish/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ apt-get install \
# sbt launcher non-deb package installation instructions adapted from
# - https://github.com/sbt/sbt/releases/tag/v1.4.9
# - https://github.com/broadinstitute/scala-baseimage/pull/4/files
curl --location --fail --silent --show-error "https://github.com/sbt/sbt/releases/download/v1.4.9/sbt-1.4.9.tgz" |
curl --location --fail --silent --show-error "https://github.com/sbt/sbt/releases/download/v1.5.5/sbt-1.5.5.tgz" |
tar zxf - -C /usr/share
update-alternatives --install /usr/bin/sbt sbt /usr/share/sbt/bin/sbt 1

Expand Down
4 changes: 2 additions & 2 deletions scripts/docker-develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ RUN apt-get update -q && \
# Git

# Env variables
ENV SCALA_VERSION 2.12.12
ENV SBT_VERSION 1.4.9
ENV SCALA_VERSION 2.12.14
ENV SBT_VERSION 1.5.3

#
## AdoptOpenJDK Hotspot
Expand Down
12 changes: 6 additions & 6 deletions src/ci/bin/test.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ cromwell::private::install_sbt_launcher() {
# Non-deb package installation instructions adapted from
# - https://github.com/sbt/sbt/releases/tag/v1.4.9
# - https://github.com/broadinstitute/scala-baseimage/pull/4/files
curl --location --fail --silent --show-error "https://github.com/sbt/sbt/releases/download/v1.4.9/sbt-1.4.9.tgz" |
curl --location --fail --silent --show-error "https://github.com/sbt/sbt/releases/download/v1.5.5/sbt-1.5.5.tgz" |
sudo tar zxf - -C /usr/share
sudo update-alternatives --install /usr/bin/sbt sbt /usr/share/sbt/bin/sbt 1
}
Expand Down Expand Up @@ -1147,9 +1147,9 @@ cromwell::private::assemble_jars() {
# CROMWELL_BUILD_SBT_ASSEMBLY_COMMAND allows for an override of the default `assembly` command for assembly.
# This can be useful to reduce time and memory that might otherwise be spent assembling unused subprojects.
# shellcheck disable=SC2086
CROMWELL_SBT_ASSEMBLY_LOG_LEVEL=error \
sbt \
sbt \
-Dsbt.supershell=false \
'set ThisBuild / assembly / logLevel := Level.Error' \
--warn \
${CROMWELL_BUILD_SBT_COVERAGE_COMMAND} \
--error \
Expand Down Expand Up @@ -1198,11 +1198,11 @@ cromwell::private::generate_code_coverage() {
}

cromwell::private::publish_artifacts_only() {
CROMWELL_SBT_ASSEMBLY_LOG_LEVEL=warn sbt -Dsbt.supershell=false --warn "$@" publish
sbt 'set ThisBuild / assembly / logLevel := Level.Warn' -Dsbt.supershell=false --warn "$@" publish
}

cromwell::private::publish_artifacts_and_docker() {
CROMWELL_SBT_ASSEMBLY_LOG_LEVEL=warn sbt -Dsbt.supershell=false --warn "$@" publish dockerBuildAndPush
sbt 'set ThisBuild / assembly / logLevel := Level.Warn' -Dsbt.supershell=false --warn "$@" publish dockerBuildAndPush
}

cromwell::private::publish_artifacts_check() {
Expand Down Expand Up @@ -1510,7 +1510,7 @@ cromwell:build::run_sbt_test() {
sbt \
-Dsbt.supershell=false \
${CROMWELL_BUILD_SBT_COVERAGE_COMMAND} \
test:compile
Test/compile

local sbt_tests

Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker-compose/cromwell-test/docker-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ apt-get clean
# non-deb package installation instructions adapted from
# - https://github.com/sbt/sbt/releases/tag/v1.4.9
# - https://github.com/broadinstitute/scala-baseimage/pull/4/files
curl -L --silent "https://github.com/sbt/sbt/releases/download/v1.4.9/sbt-1.4.9.tgz" |
curl -L --silent "https://github.com/sbt/sbt/releases/download/v1.5.5/sbt-1.5.5.tgz" |
tar zxf - -C /usr/share
update-alternatives --install /usr/bin/sbt sbt /usr/share/sbt/bin/sbt 1

Expand Down