-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dependencies, build and CI (#1478)
- Loading branch information
1 parent
a023e9d
commit 626af53
Showing
19 changed files
with
285 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,31 +19,58 @@ jobs: | |
steps: | ||
- name: Checkout current branch | ||
uses: actions/[email protected] | ||
- name: Setup Scala and Java | ||
uses: olafurpg/setup-scala@v14 | ||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
check-latest: true | ||
- name: Cache scala dependencies | ||
uses: coursier/cache-action@v6 | ||
- name: Check Document Generation | ||
run: ./sbt docs/compileDocs | ||
|
||
lint: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
check-latest: true | ||
- name: Cache scala dependencies | ||
uses: coursier/cache-action@v6 | ||
- name: Check formatting | ||
run: sbt fmt | ||
- name: Check binary compatibility | ||
run: sbt "++2.12; checkMima; ++2.13; checkMima; ++3.3; checkMima" | ||
|
||
test: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: ['[email protected]', '[email protected]'] | ||
scala: ['2.12.18', '2.13.12', '3.4.1'] | ||
java: ['11', '21'] | ||
scala: ['2.12.20', '2.13.15', '3.3.4'] | ||
platform: ['JS', 'JVM', 'Native'] | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Scala and Java | ||
uses: olafurpg/setup-scala@v14 | ||
- name: Setup Java | ||
uses: actions/setup-[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: ${{ matrix.java }} | ||
check-latest: true | ||
- name: Cache scala dependencies | ||
uses: coursier/cache-action@v6 | ||
- name: Run JS tests | ||
|
@@ -76,8 +103,12 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Scala and Java | ||
uses: olafurpg/setup-scala@v14 | ||
- name: Setup Java | ||
uses: actions/[email protected] | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
check-latest: true | ||
- name: Cache scala dependencies | ||
uses: coursier/cache-action@v6 | ||
- name: Release artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import BuildHelper._ | ||
import BuildHelper.* | ||
|
||
welcomeMessage | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
|
||
inThisBuild( | ||
List( | ||
organization := "dev.zio", | ||
homepage := Some(url("https://zio.dev/zio-config/")), | ||
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
developers := List( | ||
organization := "dev.zio", | ||
homepage := Some(url("https://zio.dev/zio-config/")), | ||
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")), | ||
developers := List( | ||
Developer( | ||
"afsalthaj", | ||
"Afsal Thaj", | ||
|
@@ -20,14 +22,16 @@ inThisBuild( | |
"[email protected]", | ||
url("http://degoes.net") | ||
) | ||
) | ||
), | ||
versionScheme := Some("early-semver") | ||
) | ||
) | ||
|
||
addCommandAlias("fmt", "; scalafmtSbt; scalafmt; test:scalafmt") | ||
addCommandAlias("lint", "; ++2.13; scalafmtSbtCheck; scalafmtCheck; ++3.3; scalafmtCheck") | ||
addCommandAlias("fmt", "; ++2.13; scalafmtSbt; scalafmtAll; ++3.3; scalafmtAll") | ||
addCommandAlias("fix", "; all compile:scalafix test:scalafix; all scalafmtSbt scalafmtAll") | ||
addCommandAlias("compileAll", "; ++2.12.18; root2-12/compile; ++2.13.12!; root2-13/compile; ++3.2.2!; root3/compile;") | ||
addCommandAlias("testAll", "; ++2.12.18; root2-12/test; ++2.13.12!; root2-13/test; ++3.2.2!; root3/test;") | ||
addCommandAlias("compileAll", "; ++2.12; root2-12/compile; ++2.13!; root2-13/compile; ++3.3!; root3/compile;") | ||
addCommandAlias("testAll", "; ++2.12; root2-12/test; ++2.13!; root2-13/test; ++3.3!; root3/test;") | ||
addCommandAlias( | ||
"testJS", | ||
";zioConfigJS/test" | ||
|
@@ -49,13 +53,17 @@ addCommandAlias( | |
";testJVM212;testJVM213;testJVM3x;" | ||
) | ||
|
||
val awsVersion = "1.12.721" | ||
val zioAwsVersion = "5.19.33.2" | ||
val zioVersion = "2.0.13" | ||
addCommandAlias( | ||
"checkMima", | ||
"all zioConfigJVM/mimaReportBinaryIssues zioConfigTypesafeJVM/mimaReportBinaryIssues zioConfigDerivationJVM/mimaReportBinaryIssues zioConfigYamlJVM/mimaReportBinaryIssues zioConfigMagnoliaJVM/mimaReportBinaryIssues zioConfigAwsJVM/mimaReportBinaryIssues zioConfigZioAwsJVM/mimaReportBinaryIssues zioConfigXmlJVM/mimaReportBinaryIssues" | ||
) | ||
|
||
val awsVersion = "1.12.777" | ||
val zioAwsVersion = "7.28.29.3" | ||
val zioVersion = "2.1.11" | ||
val magnoliaVersion = "0.17.0" | ||
val refinedVersion = "0.11.1" | ||
val pureconfigVersion = "0.16.0" | ||
val shapelessVersion = "2.4.0-M1" | ||
val refinedVersion = "0.11.2" | ||
val pureconfigVersion = "0.17.7" | ||
|
||
lazy val magnoliaDependencies = | ||
libraryDependencies ++= { | ||
|
@@ -119,25 +127,25 @@ lazy val root = | |
project | ||
.in(file(".")) | ||
.settings(publish / skip := true) | ||
.aggregate(scala213projects: _*) | ||
.aggregate(scala213projects *) | ||
|
||
lazy val `root2-12` = | ||
project | ||
.in(file("2-12")) | ||
.settings(publish / skip := true) | ||
.aggregate(scala212projects: _*) | ||
.aggregate(scala212projects *) | ||
|
||
lazy val `root2-13` = | ||
project | ||
.in(file("2-13")) | ||
.settings(publish / skip := true) | ||
.aggregate(scala213projects: _*) | ||
.aggregate(scala213projects *) | ||
|
||
lazy val `root3` = | ||
project | ||
.in(file("3")) | ||
.settings(publish / skip := true) | ||
.aggregate(scala3projects: _*) | ||
.aggregate(scala3projects *) | ||
|
||
lazy val zioConfig = crossProject(JSPlatform, JVMPlatform, NativePlatform) | ||
.in(file("core")) | ||
|
@@ -146,6 +154,7 @@ lazy val zioConfig = crossProject(JSPlatform, JVMPlatform, NativePlatform) | |
.enablePlugins(BuildInfoPlugin) | ||
.settings(buildInfoSettings("zio.config")) | ||
.settings(macroDefinitionSettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"dev.zio" %% "zio" % zioVersion, | ||
|
@@ -170,6 +179,7 @@ lazy val zioConfigAws = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-aws")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"com.amazonaws" % "aws-java-sdk-ssm" % awsVersion, | ||
|
@@ -188,6 +198,7 @@ lazy val zioConfigZioAws = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-zio-aws")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"dev.zio" %% "zio-aws-ssm" % zioAwsVersion, | ||
|
@@ -224,6 +235,7 @@ lazy val zioConfigPureconfig = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-pureconfig")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
pureconfigDependencies, | ||
libraryDependencies ++= | ||
|
@@ -256,7 +268,7 @@ lazy val examples = crossProject(JVMPlatform) | |
|
||
val runTasks = classes.map { cc => | ||
Def.task { | ||
runs.toTask(s" ${cc}").value | ||
runs.toTask(s" $cc").value | ||
} | ||
} | ||
|
||
|
@@ -273,6 +285,7 @@ lazy val zioConfigDerivation = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-derivation")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.dependsOn(zioConfig) | ||
|
||
lazy val zioConfigDerivationJVM = zioConfigDerivation.jvm | ||
|
@@ -282,6 +295,7 @@ lazy val zioConfigMagnolia = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-magnolia")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
magnoliaDependencies, | ||
scalacOptions ++= { | ||
|
@@ -306,6 +320,7 @@ lazy val zioConfigTypesafe = crossProject(JVMPlatform) | |
.settings(stdSettings("zio-config-typesafe")) | ||
.settings(crossProjectSettings) | ||
.settings(dottySettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"com.typesafe" % "config" % "1.4.3", | ||
|
@@ -322,9 +337,10 @@ lazy val zioConfigYaml = crossProject(JVMPlatform) | |
.in(file("yaml")) | ||
.settings(stdSettings("zio-config-yaml")) | ||
.settings(crossProjectSettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"org.snakeyaml" % "snakeyaml-engine" % "2.6", | ||
"org.snakeyaml" % "snakeyaml-engine" % "2.7", | ||
"dev.zio" %% "zio-test" % zioVersion % Test, | ||
"dev.zio" %% "zio-test-sbt" % zioVersion % Test | ||
), | ||
|
@@ -339,6 +355,7 @@ lazy val zioConfigXml = crossProject(JVMPlatform) | |
.in(file("xml")) | ||
.settings(stdSettings("zio-config-xml")) | ||
.settings(crossProjectSettings) | ||
.settings(enableMimaSettings) | ||
.settings( | ||
libraryDependencies ++= Seq( | ||
"dev.zio" %% "zio-parser" % "0.1.9", | ||
|
@@ -451,3 +468,10 @@ lazy val docs = project | |
zioConfigMagnoliaJVM | ||
) | ||
.enablePlugins(WebsitePlugin) | ||
|
||
lazy val enableMimaSettings = | ||
Def.settings( | ||
mimaFailOnProblem := true, | ||
mimaPreviousArtifacts := previousStableVersion.value.map(organization.value %% moduleName.value % _).toSet, | ||
mimaBinaryIssueFilters := Seq() | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/shared/src/main/scala/zio/config/examples/autoderivation/AutoDerivationPureConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.