Skip to content

Add Scala.js 1.10.0 support #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 5, 2022
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
35 changes: 26 additions & 9 deletions .github/workflows/launchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2016, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
scalaJsVersion: ["1.9.0", "1.10.0"]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -23,16 +24,20 @@ jobs:
with:
jvm: 8
- run: |
./mill -i "native.writeNativeImageScript" generate.sh "" && \
./mill -i "native[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native.copyToArtifacts" artifacts/
./mill -i "native[$scalaJsVersion].copyToArtifacts" artifacts/
if: runner.os != 'Windows'
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
- run: |
@call ./mill.bat -i "native.writeNativeImageScript" generate.bat ""
@call ./mill.bat -i "native[%scalaJsVersion%].writeNativeImageScript" generate.bat ""
@call generate.bat
@call ./mill.bat -i "native.copyToArtifacts" artifacts/
@call ./mill.bat -i "native[%scalaJsVersion%].copyToArtifacts" artifacts/
shell: cmd
if: runner.os == 'Windows'
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
- uses: actions/[email protected]
with:
name: launcher-${{ matrix.os }}
Expand All @@ -46,6 +51,10 @@ jobs:

generate-static-launcher:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scalaJsVersion: ["1.9.0", "1.10.0"]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -56,9 +65,11 @@ jobs:
with:
jvm: 8
- run: |
./mill -i "native-static.writeNativeImageScript" generate.sh "" && \
./mill -i "native-static[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native-static.copyToArtifacts" artifacts/
./mill -i "native-static[$scalaJsVersion].copyToArtifacts" artifacts/
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
- uses: actions/[email protected]
with:
name: launcher-${{ matrix.os }}-static
Expand All @@ -72,6 +83,10 @@ jobs:

generate-mostly-static-launcher:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
scalaJsVersion: ["1.9.0", "1.10.0"]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -82,9 +97,11 @@ jobs:
with:
jvm: 8
- run: |
./mill -i "native-mostly-static.writeNativeImageScript" generate.sh "" && \
./mill -i "native-mostly-static[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native-mostly-static.copyToArtifacts" artifacts/
./mill -i "native-mostly-static[$scalaJsVersion].copyToArtifacts" artifacts/
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
- uses: actions/[email protected]
with:
name: launcher-${{ matrix.os }}-mostly-static
Expand Down
13 changes: 8 additions & 5 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import mill._
import mill.scalalib._

def scalaJsCliVersion = "1.1.1-sc1"
def scalaJsVersions = Seq("1.9.0", "1.10.0")

trait ScalaJsCliNativeImage extends ScalaModule with NativeImage {
class ScalaJsCliNativeImage(val scalaJsVersion0: String) extends ScalaModule with NativeImage {
def scalaVersion = "2.13.8"
def scalaJsVersion = "1.9.0"
def scalaJsVersion = scalaJsVersion0

def nativeImageClassPath = T{
runClasspath()
Expand Down Expand Up @@ -44,11 +45,11 @@ trait ScalaJsCliNativeImage extends ScalaModule with NativeImage {
}
}

object native extends ScalaJsCliNativeImage
object native extends Cross[ScalaJsCliNativeImage](scalaJsVersions: _*)

def csDockerVersion = "2.1.0-M5-18-gfebf9838c"

object `native-static` extends ScalaJsCliNativeImage {
class ScalaJsCliStaticNativeImage(scalaJsVersion0: String) extends ScalaJsCliNativeImage(scalaJsVersion0) {
def nameSuffix = "-static"
def buildHelperImage = T {
os.proc("docker", "build", "-t", "scala-cli-base-musl:latest", ".")
Expand All @@ -69,8 +70,9 @@ object `native-static` extends ScalaJsCliNativeImage {
super.writeNativeImageScript(scriptDest, imageDest)()
}
}
object `native-static` extends Cross[ScalaJsCliStaticNativeImage](scalaJsVersions: _*)

object `native-mostly-static` extends ScalaJsCliNativeImage {
class ScalaJsCliMostlyStaticNativeImage(scalaJsVersion0: String) extends ScalaJsCliNativeImage(scalaJsVersion0) {
def nameSuffix = "-mostly-static"
def nativeImageDockerParams = Some(
NativeImage.linuxMostlyStaticParams(
Expand All @@ -79,6 +81,7 @@ object `native-mostly-static` extends ScalaJsCliNativeImage {
)
)
}
object `native-mostly-static` extends Cross[ScalaJsCliMostlyStaticNativeImage](scalaJsVersions: _*)


def publishVersion = T{
Expand Down