-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
52 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 |
---|---|---|
|
@@ -25,6 +25,7 @@ jobs: | |
os: [ubuntu-latest] | ||
scala: [2.12.13, 2.13.5] | ||
java: [[email protected]] | ||
ci: [validateJVM, validateJS, validateNative] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
|
@@ -52,17 +53,8 @@ jobs: | |
- name: Check that workflows are up to date | ||
run: sbt ++${{ matrix.scala }} githubWorkflowCheck | ||
|
||
- name: Build and Validate | ||
run: sbt ++${{ matrix.scala }} validate | ||
|
||
- name: Compress target directories | ||
run: tar cf targets.tar target core/.js/target core/.jvm/target project/target | ||
|
||
- name: Upload target directories | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} | ||
path: targets.tar | ||
- name: Validation | ||
run: sbt ++${{ matrix.scala }} '${{ matrix.ci }}' | ||
|
||
publish: | ||
name: Publish Artifacts | ||
|
@@ -97,26 +89,6 @@ jobs: | |
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Download target directories (2.12.13) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-2.12.13-${{ matrix.java }} | ||
|
||
- name: Inflate target directories (2.12.13) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Download target directories (2.13.5) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-2.13.5-${{ matrix.java }} | ||
|
||
- name: Inflate target directories (2.13.5) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- uses: olafurpg/setup-gpg@v3 | ||
|
||
- env: | ||
|
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 |
---|---|---|
|
@@ -56,28 +56,35 @@ lazy val coreSettings = | |
|
||
lazy val kittens = project | ||
.in(file(".")) | ||
.aggregate(coreJS, coreJVM) | ||
.dependsOn(coreJS, coreJVM) | ||
.aggregate(coreJS, coreJVM, coreNative) | ||
.dependsOn(coreJS, coreJVM, coreNative) | ||
.settings(coreSettings: _*) | ||
.settings(noPublishSettings) | ||
|
||
lazy val core = crossProject(JSPlatform, JVMPlatform) | ||
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) | ||
.crossType(CrossType.Pure) | ||
.settings(moduleName := "kittens") | ||
.settings(coreSettings: _*) | ||
.jsSettings(commonJsSettings: _*) | ||
|
||
lazy val coreJVM = core.jvm | ||
lazy val coreJS = core.js | ||
lazy val coreNative = core.native | ||
|
||
addCommandAlias("root", ";project kittens") | ||
addCommandAlias("jvm", ";project coreJVM") | ||
addCommandAlias("js", ";project coreJS") | ||
addCommandAlias("native", ";project coreNative") | ||
|
||
addCommandAlias("validate", "all scalafmtCheckAll scalafmtSbtCheck test doc coreJVM/mimaReportBinaryIssues") | ||
addCommandAlias( | ||
"validateJVM", | ||
"all scalafmtCheckAll scalafmtSbtCheck coreJVM/test coreJVM/doc coreJVM/mimaReportBinaryIssues" | ||
) | ||
addCommandAlias("validateJS", "all coreJS/test") | ||
addCommandAlias("validateNative", "all coreNative/test") | ||
addCommandAlias("mima", "coreJVM/mimaReportBinaryIssues") | ||
addCommandAlias("fmt", "all scalafmtSbt scalafmtAll") | ||
addCommandAlias("fmtCheck", "all scalafmtSbtCheck scalafmtCheckAll") | ||
addCommandAlias("mima", "coreJVM/mimaReportBinaryIssues") | ||
|
||
lazy val crossVersionSharedSources: Seq[Setting[_]] = Seq(Compile, Test).map { sc => | ||
(sc / unmanagedSourceDirectories) ++= (sc / unmanagedSourceDirectories).value.map { dir: File => | ||
|
@@ -102,7 +109,9 @@ lazy val noPublishSettings = | |
publish / skip := true | ||
|
||
ThisBuild / githubWorkflowJavaVersions := Seq("[email protected]") | ||
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("validate"), id = None, name = Some("Build and Validate"))) | ||
ThisBuild / githubWorkflowArtifactUpload := false | ||
ThisBuild / githubWorkflowBuildMatrixAdditions += "ci" -> List("validateJVM", "validateJS", "validateNative") | ||
ThisBuild / githubWorkflowBuild := List(WorkflowStep.Sbt(List("${{ matrix.ci }}"), name = Some("Validation"))) | ||
ThisBuild / githubWorkflowTargetTags ++= Seq("v*") | ||
ThisBuild / githubWorkflowPublishTargetBranches := Seq(RefPredicate.StartsWith(Ref.Tag("v"))) | ||
ThisBuild / githubWorkflowPublishPreamble += WorkflowStep.Use(UseRef.Public("olafurpg", "setup-gpg", "v3")) | ||
|
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,7 +1,9 @@ | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") | ||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1") | ||
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") | ||
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0") | ||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") | ||
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0") | ||
addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") | ||
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1") | ||
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.7") | ||
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1") | ||
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") | ||
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1") |