Skip to content

Commit 23b94cd

Browse files
xerialandreaTP
andauthored
Publish Scala.js binaries for Scala 2.13 (#870)
Co-authored-by: Andrea Peruffo <andrea.peruffo1982@gmail.com>
1 parent 43aa8e8 commit 23b94cd

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

.github/workflows/release-js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
- name: Build for Scala.js 0.6.x
2828
env:
2929
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
30-
run: SCALA_JS_VERSION=0.6.31 ./sbt "projectJS/publishSigned"
30+
run: SCALA_JS_VERSION=0.6.31 ./sbt "; + projectJS/publishSigned"
3131
- name: Build for Scala.js 1.0.x
3232
env:
3333
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
34-
run: SCALA_JS_VERSION=1.0.0-RC2 ./sbt "projectJS/publishSigned"
34+
run: SCALA_JS_VERSION=1.0.0-RC2 ./sbt "; + projectJS/publishSigned"
3535
- name: Release to Sonatype
3636
env:
3737
SONATYPE_USERNAME: '${{ secrets.SONATYPE_USER }}'

.github/workflows/test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,19 @@ jobs:
8383
- name: Scala.js test
8484
# A workaround for Scala.js linker error
8585
run: ./sbt "; airspecJS/test:fastOptJS; projectJS/test"
86+
test_js_2_13:
87+
name: Scala.js with Scala 2.13
88+
runs-on: ubuntu-latest
89+
steps:
90+
- uses: actions/checkout@v1
91+
- uses: olafurpg/setup-scala@v5
92+
with:
93+
java-version: adopt@1.11
94+
- uses: actions/cache@v1
95+
with:
96+
path: ~/.cache
97+
key: ${{ runner.os }}-scala-js-${{ hashFiles('**/*.sbt') }}
98+
restore-keys: ${{ runner.os }}-scala-js-
99+
- name: Scala.js test
100+
# A workaround for Scala.js linker error
101+
run: ./sbt ++2.13.1 "; airspecJS/test:fastOptJS; projectJS/test"

airframe/.jvm/src/main/scala/wvlet/airframe/lifecycle/AddShutdownHook.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
*/
1414
package wvlet.airframe.lifecycle
1515

16-
import java.util.concurrent.atomic.AtomicInteger
17-
1816
import wvlet.log.AirframeLogManager
1917

2018
import scala.collection.mutable

build.sbt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ val SCALA_2_13 = "2.13.1"
66

77
val untilScala2_12 = SCALA_2_12 :: SCALA_2_11 :: Nil
88
val targetScalaVersions = SCALA_2_13 :: untilScala2_12
9+
val exceptScala2_11 = SCALA_2_13 :: SCALA_2_12 :: Nil
910

1011
val SCALATEST_VERSION = "3.0.8"
1112
val SCALACHECK_VERSION = "1.14.3"
@@ -67,6 +68,7 @@ val runTestSequentially = Seq[Setting[_]](parallelExecution in Test := false)
6768
publishTo in ThisBuild := sonatypePublishToBundle.value
6869

6970
val jsBuildSettings = Seq[Setting[_]](
71+
crossScalaVersions := exceptScala2_11,
7072
coverageEnabled := false
7173
// Workaround for ' JSCom has been closed' issue
7274
//parallelExecution in ThisBuild := false
@@ -153,7 +155,7 @@ lazy val jvmProjects2_12: Seq[ProjectReference] = Seq(
153155
examples
154156
)
155157

156-
// Scala.js build (only for Scala 2.12)
158+
// Scala.js build (only for Scala 2.12 + 2.13)
157159
lazy val jsProjects: Seq[ProjectReference] = Seq(
158160
airframeJS,
159161
surfaceJS,
@@ -218,7 +220,7 @@ lazy val projectJS =
218220
project
219221
.settings(
220222
noPublish,
221-
crossScalaVersions := Seq(SCALA_2_12)
223+
crossScalaVersions := exceptScala2_11
222224
)
223225
.aggregate(jsProjects: _*)
224226

0 commit comments

Comments
 (0)