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
40 changes: 37 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
os: [ubuntu-latest]
scala: [2.12.16, 2.13.8, 3.1.2]
java: [temurin@8]
project: [rootJS, rootJVM]
project: [rootJS, rootJVM, rootNative]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
Expand Down Expand Up @@ -77,6 +77,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

Expand All @@ -90,11 +94,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 target .js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target tests/jvm/target project/target
run: mkdir -p target .js/target core/native/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target tests/jvm/target tests/native/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 target .js/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target tests/jvm/target project/target
run: tar cf targets.tar target .js/target core/native/target core/js/target core/jvm/target tests/js/target .jvm/target .native/target tests/jvm/target tests/native/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 @@ -167,6 +171,16 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.12.16, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.16-rootNative

- name: Inflate target directories (2.12.16, rootNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13.8, rootJS)
uses: actions/download-artifact@v2
with:
Expand All @@ -187,6 +201,16 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (2.13.8, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootNative

- name: Inflate target directories (2.13.8, rootNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.1.2, rootJS)
uses: actions/download-artifact@v2
with:
Expand All @@ -207,6 +231,16 @@ jobs:
tar xf targets.tar
rm targets.tar

- name: Download target directories (3.1.2, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.2-rootNative

- name: Inflate target directories (3.1.2, rootNative)
run: |
tar xf targets.tar
rm targets.tar

- name: Import signing key
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
run: echo $PGP_SECRET | base64 -di | gpg --import
Expand Down
11 changes: 7 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ThisBuild / tlBaseVersion := "1.0"
ThisBuild / tlBaseVersion := "1.1"

ThisBuild / developers += tlGitHubDev("mpilquist", "Michael Pilquist")
ThisBuild / startYear := Some(2021)
Expand All @@ -8,22 +8,25 @@ ThisBuild / tlVersionIntroduced := Map("3" -> "1.0.2")

lazy val root = tlCrossRootProject.aggregate(core, tests)

lazy val core = crossProject(JSPlatform, JVMPlatform)
lazy val core = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.settings(
name := "literally",
scalacOptions := scalacOptions.value.filterNot(_ == "-source:3.0-migration"),
libraryDependencies ++= {
if (tlIsScala3.value) Nil else List("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided)
}
)
.nativeSettings(
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.1.0").toMap
)

lazy val tests = crossProject(JSPlatform, JVMPlatform)
lazy val tests = crossProject(JSPlatform, JVMPlatform, NativePlatform)
.enablePlugins(NoPublishPlugin)
.dependsOn(core)
.settings(
name := "tests",
scalacOptions := scalacOptions.value.filterNot(_ == "-source:3.0-migration"),
libraryDependencies += "org.scalameta" %%% "munit" % "0.7.29" % Test,
libraryDependencies += "org.scalameta" %%% "munit" % "1.0.0-M5" % Test,
libraryDependencies ++= {
if (tlIsScala3.value) Nil else List("org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided)
}
Expand Down
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.12")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")