Skip to content

Commit

Permalink
Simplify sbt command aliases & use in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reidspencer committed Jan 14, 2025
1 parent 1d4f8bf commit 6158078
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 76 deletions.
44 changes: 3 additions & 41 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,53 +57,15 @@ jobs:
- name: Build And Test JVM Versions
run: |
sbt -v clean \
utils/Test/compile \
language/Test/compile \
passes/Test/compile \
diagrams/Test/compile \
commands/Test/compile \
riddlLib/Test/compile \
riddlc/Test/compile \
utils/test \
language/test \
passes/test \
diagrams/test \
commands/test \
riddlLib/test \
riddlc/test
sbt -v clean cJVM tJVM
- name: Build And Test Native Versions
run: |
sbt -v \
utilsNative/Test/compile \
languageNative/Test/compile \
passesNative/Test/compile \
diagramsNative/Test/compile \
commandsNative/Test/compile \
riddlLibNative/Test/compile \
riddlcNative/Test/compile \
utilsNative/test \
languageNative/test \
passesNative/test \
diagramsNative/test \
commandsNative/test \
riddlLibNative/compile \
riddlcNative/test
sbt -v cNative tNative
- name: Build And Test JS Versions
run: |
sbt -v \
utilsJS/Test/compile \
languageJS/Test/compile \
passesJS/Test/compile \
diagramsJS/Test/compile \
riddlLibJS/Test/compile \
utilsJS/test \
languageJS/test \
passesJS/test \
diagramsJS/test \
riddlLibJS/test
sbt -v cJS tJS
- name: Publish JVM RIDDL Libs & Test sbt-riddl plugin
env:
Expand Down
76 changes: 41 additions & 35 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import com.ossuminc.sbt.OssumIncPlugin
import com.typesafe.tools.mima.core.{ProblemFilters, ReversedMissingMethodProblem}
import de.heikoseeberger.sbtheader.License.ALv2
import de.heikoseeberger.sbtheader.LicenseStyle.SpdxSyntax
import os./
import sbt.Append.{appendSeqImplicit, appendSet}
import sbt.Keys.{description, libraryDependencies, scalacOptions}
import sbtbuildinfo.BuildInfoPlugin.autoImport.buildInfoPackage
Expand Down Expand Up @@ -114,11 +115,17 @@ lazy val utils_cp: CrossProject = CrossModule("utils", "riddl-utils")(JVM, JS, N
"org.scalatest" %%% "scalatest" % V.scalatest % Test
)
)
.nativeConfigure(With.native(mode = "fast", buildTarget = "static", linkOptions = Seq(
"-I/usr/include",
"-I/usr/local/opt/curl/include",
"-I/opt/homebrew/opt/curl/include"
)))
.nativeConfigure(
With.native(
mode = "fast",
buildTarget = "static",
linkOptions = Seq(
"-I/usr/include",
"-I/usr/local/opt/curl/include",
"-I/opt/homebrew/opt/curl/include"
)
)
)
.nativeConfigure(
With.build_info_plus_keys(
"scalaNativeVersion" -> scalanative.sbtplugin.ScalaNativePlugin.autoImport.nativeVersion
Expand Down Expand Up @@ -180,11 +187,17 @@ lazy val language_cp: CrossProject = CrossModule("language", "riddl-language")(J
libraryDependencies += "com.lihaoyi" %%% "fastparse" % V.fastparse,
libraryDependencies += "org.wvlet.airframe" %%% "airframe-ulid" % V.airframe_ulid
)
.nativeConfigure(With.native(mode = "fast", buildTarget = "static", linkOptions = Seq(
"-I/usr/include",
"-I/usr/local/opt/curl/include",
"-I/opt/homebrew/opt/curl/include"
)))
.nativeConfigure(
With.native(
mode = "fast",
buildTarget = "static",
linkOptions = Seq(
"-I/usr/include",
"-I/usr/local/opt/curl/include",
"-I/opt/homebrew/opt/curl/include"
)
)
)
.nativeConfigure(With.noMiMa)
.nativeSettings(
libraryDependencies ++= Seq(
Expand Down Expand Up @@ -310,11 +323,11 @@ lazy val riddlLib_cp: CrossProject = CrossModule("riddlLib", "riddl-lib")(JS, JV
.jvmConfigure(With.MiMa("0.57.0"))
.jvmConfigure(
With.packagingUniversal(
maintainerEmail = "[email protected]",
pkgName = "riddlLib",
pkgSummary = "Library for RIDDL language, Universal packaging",
pkgDescription = ""
)
maintainerEmail = "[email protected]",
pkgName = "riddlLib",
pkgSummary = "Library for RIDDL language, Universal packaging",
pkgDescription = ""
)
)
.jvmSettings(
coverageExcludedFiles := """<empty>;$anon"""
Expand Down Expand Up @@ -437,42 +450,35 @@ lazy val plugin = Plugin("sbt-riddl")

addCommandAlias(
"cJVM",
"; project utils; Test/compile ; project language ; Test/compile ; project passes; " +
" Test/compile; project testkit ; Test/compile ; project diagrams; Test/compile ; project commands ; " +
"Test/compile ; project riddlLib ; Test/compile ; project riddlc ; Test/compile"
"; utils/Test/compile ; language/Test/compile ; passes/Test/compile; testkit/Test/compile ; " +
"diagrams/Test/compile ; commands/Test/compile ; riddlLib/Test/compile ; riddlc/Test/compile"
)
addCommandAlias(
"cNative",
"; project utilsNative; Test/compile ; project languageNative ; Test/compile ; project passesNative ; " +
"Test/compile ; project testkitNative ; Test/compile ; project diagramsNative; Test/compile ; " +
"project commandsNative ; Test/compile ; project riddlLibNative ; Test/compile ; project riddlcNative ; " +
"Test/compile"
"; utilsNative/Test/compile ; languageNative/Test/compile ; passesNative/Test/compile ; " +
"testkitNative/Test/compile ; diagramsNative/Test/compile ; commandsNative/Test/compile ; " +
"riddlLibNative/Test/compile ; riddlcNative/Test/compile"
)

addCommandAlias(
"cJS",
"; project utilsJS; Test/compile ; project languageJS ; Test/compile ; project passesJS ; " +
"Test/compile ; project testkitJS ; Test/compile ; project diagramsJS; Test/compile ; " +
"project riddlLibJS ; Test/compile ; fastLinkJS"
"; utilsJS/Test/compile ; languageJS/Test/compile ; passesJS/Test/compile ; " +
"testkitJS/Test/compile ; diagramsJS/Test/compile ; riddlLibJS/Test/compile ; fastLinkJS"
)
addCommandAlias(
"tJVM",
"; project utils; test ; project language ; test ; project passes; " +
" test; project testkit ; test ; project diagrams; test ; project commands ; " +
"test ; project riddlLib ; test ; project riddlc ; test ; project root"
"; utils/test ; language/test ; passes/test ; /testkit/test ; diagrams/test ; commands/test ; " +
"riddlLib/test ; riddlc/test"
)
addCommandAlias(
"tNative",
"; project utilsNative; test ; project languageNative ; test ; project passesNative ; " +
"test ; project testkitNative ; test ; project diagramsNative; test ; " +
"project commandsNative ; test ; project riddlLibNative ; test ; project riddlcNative ; " +
"test ; nativeLink ; project root"
"; utils/test ; language/test ; passesNative/test ; testkit/test ; diagrams/test ; " +
"commands/test ; riddlLib/test ; riddlcNative/test ; nativeLink"
)
addCommandAlias(
"tJS",
"; project utilsJS; test ; project languageJS ; test ; project passesJS ; " +
"test ; project testkitJS ; test ; project diagramsJS; test ; " +
"project riddlLibJS ; test ; fastLinkJS ; project root"
"; utilsJS/test ; languageJS/test ; passesJS/test ; testkitJS/test ; diagramsJS/test ; " +
"riddlLibJS/test ; fastLinkJS"
)
addCommandAlias(
"packageArtifacts",
Expand Down

0 comments on commit 6158078

Please sign in to comment.