Skip to content
Merged
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
36 changes: 32 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
os: [ubuntu-22.04]
scala: [2.13, 3]
java: [temurin@8, temurin@11, temurin@17]
project: [http4s-grpcJVM, http4s-grpcJS]
project: [http4s-grpcJVM, http4s-grpcJS, http4s-grpcNative]
exclude:
- scala: 3
java: temurin@11
Expand All @@ -41,6 +41,10 @@ jobs:
java: temurin@11
- project: http4s-grpcJS
java: temurin@17
- project: http4s-grpcNative
java: temurin@11
- project: http4s-grpcNative
java: temurin@17
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -102,6 +106,10 @@ jobs:
if: matrix.project == 'http4s-grpcJS'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult

- name: nativeLink
if: matrix.project == 'http4s-grpcNative'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink

- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

Expand All @@ -123,11 +131,11 @@ jobs:

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p core/.js/target codegen/plugin/target core/.jvm/target codegen/generator/target project/target
run: mkdir -p core/.native/target core/.js/target codegen/plugin/target core/.jvm/target codegen/generator/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar core/.js/target codegen/plugin/target core/.jvm/target codegen/generator/target project/target
run: tar cf targets.tar core/.native/target core/.js/target codegen/plugin/target core/.jvm/target codegen/generator/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
Expand Down Expand Up @@ -213,6 +221,16 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13, http4s-grpcNative)
uses: actions/download-artifact@v6
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-http4s-grpcNative

- name: Inflate target directories (2.13, http4s-grpcNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, http4s-grpcJVM)
uses: actions/download-artifact@v6
with:
Expand All @@ -233,6 +251,16 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (3, http4s-grpcNative)
uses: actions/download-artifact@v6
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-http4s-grpcNative

- name: Inflate target directories (3, http4s-grpcNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
env:
Expand Down Expand Up @@ -316,7 +344,7 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: http4s-grpcjvm_2.13 http4s-grpcjvm_3 codegeneratortesting_sjs1_2.13 codegeneratortesting_sjs1_3 site_2.13 site_3 http4s-grpcjs_2.13 http4s-grpcjs_3 http4s-grpcnative_2.13 http4s-grpcnative_3 sbt-http4s-org-scalafix-internal_2.13 sbt-http4s-org-scalafix-internal_3 codegeneratortesting_2.13 codegeneratortesting_3
modules-ignore: http4s-grpcjvm_2.13 http4s-grpcjvm_3 codegeneratortesting_native0.5_2.13 codegeneratortesting_native0.5_3 codegeneratortesting_sjs1_2.13 codegeneratortesting_sjs1_3 site_2.13 site_3 http4s-grpcjs_2.13 http4s-grpcjs_3 http4s-grpcnative_2.13 http4s-grpcnative_3 sbt-http4s-org-scalafix-internal_2.13 sbt-http4s-org-scalafix-internal_3 codegeneratortesting_2.13 codegeneratortesting_3
configs-ignore: test scala-tool scala-doc-tool test-internal

site:
Expand Down
12 changes: 9 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inThisBuild(
Seq(
crossScalaVersions := Seq(scala213Version, scala3Version),
scalaVersion := scala213Version,
tlBaseVersion := "0.2",
tlBaseVersion := "0.3",
organizationName := "Christopher Davenport",
startYear := Some(2023),
licenses := Seq(License.MIT),
Expand All @@ -31,7 +31,7 @@ lazy val `http4s-grpc` = tlCrossRootProject
.aggregate(core, codeGenerator, codeGeneratorTesting, codeGeneratorPlugin)
.settings(unusedCompileDependenciesFilter -= moduleFilter())

lazy val core = crossProject(JVMPlatform, JSPlatform)
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("core"))
.settings(
Expand All @@ -52,6 +52,9 @@ lazy val core = crossProject(JVMPlatform, JSPlatform)
.jsSettings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }
)
.nativeSettings(
tlVersionIntroduced := List("2.13", "3").map(_ -> "0.3.0").toMap
)

lazy val codeGenerator =
project
Expand Down Expand Up @@ -96,7 +99,7 @@ lazy val codeGeneratorPlugin = project
)
.disablePlugins(ScalafixPlugin)

lazy val codeGeneratorTesting = crossProject(JVMPlatform, JSPlatform)
lazy val codeGeneratorTesting = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Pure)
.in(file("codegen/testing"))
.enablePlugins(LocalCodeGenPlugin, BuildInfoPlugin, NoPublishPlugin)
Expand All @@ -121,6 +124,9 @@ lazy val codeGeneratorTesting = crossProject(JVMPlatform, JSPlatform)
githubWorkflowArtifactUpload := false,
unusedCompileDependenciesFilter -= moduleFilter(),
)
.nativeSettings(
tlVersionIntroduced := List("2.13", "3").map(_ -> "0.3.0").toMap
)
.disablePlugins(ScalafixPlugin)

lazy val site = project
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ addSbtPlugin("com.thesamet" % "sbt-protoc-gen-project" % "0.1.8")
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.8")
addSbtPlugin("org.http4s" % "sbt-http4s-org" % "2.0.5")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.21.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.11")

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.20"
Loading