diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd06f7119..239c88ee8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: os: [ubuntu-latest] scala: [2.12, 2.13, 3] java: [temurin@8, temurin@17] - project: [rootJS, rootJVM, plugin] + project: [rootJS, rootJVM, rootNative, plugin] exclude: - scala: 2.13 java: temurin@17 @@ -38,6 +38,8 @@ jobs: java: temurin@17 - project: rootJS java: temurin@17 + - project: rootNative + java: temurin@17 - project: plugin java: temurin@17 - project: plugin @@ -89,6 +91,10 @@ jobs: if: matrix.project == 'rootJS' run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult + - name: nativeLink + if: matrix.project == 'rootNative' + run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink + - name: Test run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test @@ -110,11 +116,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 sbt/target pdf/target preview/target core/js/target io/target unidoc/target core/jvm/target project/target + run: mkdir -p sbt/target pdf/target preview/target core/native/target core/js/target io/target unidoc/target core/jvm/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 sbt/target pdf/target preview/target core/js/target io/target unidoc/target core/jvm/target project/target + run: tar cf targets.tar sbt/target pdf/target preview/target core/native/target core/js/target io/target unidoc/target core/jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') @@ -184,6 +190,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (2.12, rootNative) + uses: actions/download-artifact@v3 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative + + - name: Inflate target directories (2.12, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Download target directories (2.12, plugin) uses: actions/download-artifact@v3 with: @@ -214,6 +230,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (2.13, rootNative) + uses: actions/download-artifact@v3 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative + + - name: Inflate target directories (2.13, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Download target directories (3, rootJS) uses: actions/download-artifact@v3 with: @@ -234,6 +260,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (3, rootNative) + uses: actions/download-artifact@v3 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative + + - name: Inflate target directories (3, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' env: diff --git a/build.sbt b/build.sbt index f135fd71d..46013c69f 100644 --- a/build.sbt +++ b/build.sbt @@ -54,9 +54,9 @@ def disableUnusedWarningsForMdoc(options: Seq[String]): Seq[String] = val munit = "org.scalameta" %% "munit" % versions.munit % "test" val jTidy = "net.sf.jtidy" % "jtidy" % versions.jTidy % "test" -val catsEffect = "org.typelevel" %% "cats-effect" % versions.catsEffect -val fs2IO = "co.fs2" %% "fs2-io" % versions.fs2 -val munitCE3 = "org.typelevel" %% "munit-cats-effect-3" % versions.munitCE3 % "test" +val catsEffect = "org.typelevel" %% "cats-effect" % versions.catsEffect +val fs2IO = "co.fs2" %% "fs2-io" % versions.fs2 +val munitCE = "org.typelevel" %% "munit-cats-effect" % versions.munitCE % "test" val fop = "org.apache.xmlgraphics" % "fop" % versions.fop @@ -115,7 +115,7 @@ lazy val api = project ) ) -lazy val core = crossProject(JSPlatform, JVMPlatform) +lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform) .withoutSuffixFor(JVMPlatform) .crossType(CrossType.Full) .in(file("core")) @@ -135,12 +135,15 @@ lazy val core = crossProject(JSPlatform, JVMPlatform) _.withModuleKind(ModuleKind.CommonJSModule).withESFeatures(_.withESVersion(ESVersion.ES2018)) } ) + .nativeSettings( + libraryDependencies += "io.github.cquiroz" %%% "scala-java-time" % versions.scalaJavaTime + ) lazy val io = project.in(file("io")) .dependsOn(core.jvm % "compile->compile;test->test") .settings( name := "laika-io", - libraryDependencies ++= Seq(catsEffect, fs2IO, munit, munitCE3), + libraryDependencies ++= Seq(catsEffect, fs2IO, munit, munitCE), Test / scalacOptions ~= disableMissingInterpolatorWarning ) diff --git a/core/jvm/src/main/scala/laika/config/PlatformDateTimeImpl.scala b/core/jvm-native/src/main/scala/laika/config/PlatformDateTimeImpl.scala similarity index 100% rename from core/jvm/src/main/scala/laika/config/PlatformDateTimeImpl.scala rename to core/jvm-native/src/main/scala/laika/config/PlatformDateTimeImpl.scala diff --git a/core/jvm/src/test/scala/laika/time/PlatformDateDirectiveSpec.scala b/core/jvm-native/src/test/scala/laika/time/PlatformDateDirectiveSpec.scala similarity index 100% rename from core/jvm/src/test/scala/laika/time/PlatformDateDirectiveSpec.scala rename to core/jvm-native/src/test/scala/laika/time/PlatformDateDirectiveSpec.scala diff --git a/core/jvm/src/test/scala/laika/time/PlatformDateTimeSpec.scala b/core/jvm-native/src/test/scala/laika/time/PlatformDateTimeSpec.scala similarity index 100% rename from core/jvm/src/test/scala/laika/time/PlatformDateTimeSpec.scala rename to core/jvm-native/src/test/scala/laika/time/PlatformDateTimeSpec.scala diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 2e6ba8e38..9fbeede60 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -11,10 +11,12 @@ object Dependencies { val fs2 = "3.9.2" val http4s = "0.23.23" - val munit = "0.7.29" - val munitCE3 = "1.0.7" - val jTidy = "r938" - val fop = "2.9" + val munit = "1.0.0-M10" + val munitCE = "2.0.0-M3" + val jTidy = "r938" + val fop = "2.9" + + val scalaJavaTime = "2.5.0" } }