Skip to content

Merge scala-js-cli repository into scala-js-cli-native-image #7

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 2 commits into from
Aug 25, 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
46 changes: 44 additions & 2 deletions .github/workflows/launchers.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,49 @@
name: Launchers
name: CI
on:
push:
branches:
- master
tags:
- "v*"
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@0dab3c3ec860f0443d4d25a56a549f9f46204389
with:
jvm: "temurin:17"
- name: Test CLI
run: ./mill -i ci.testCli

publish:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- uses: VirtusLab/scala-cli-setup@0dab3c3ec860f0443d4d25a56a549f9f46204389
with:
jvm: "temurin:17"
- run: ./mill -i ci.publishSonatype __.publishArtifacts
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

generate-launchers:
needs: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -26,13 +62,15 @@ jobs:
- run: |
./mill -i "native[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native[$scalaJsVersion].testNative" && \
./mill -i "native[$scalaJsVersion].copyToArtifacts" artifacts/
if: runner.os != 'Windows'
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
- run: |
@call ./mill.bat -i "native[%scalaJsVersion%].writeNativeImageScript" generate.bat ""
@call generate.bat
@call ./mill.bat -i "native[%scalaJsVersion%].testNative"
@call ./mill.bat -i "native[%scalaJsVersion%].copyToArtifacts" artifacts/
shell: cmd
if: runner.os == 'Windows'
Expand All @@ -44,12 +82,13 @@ jobs:
path: artifacts/
if-no-files-found: error
retention-days: 1
- run: ./mill -i upload artifacts/
- run: ./mill -i ci.upload artifacts/
if: github.event_name == 'push'
env:
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

generate-static-launcher:
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -67,6 +106,7 @@ jobs:
- run: |
./mill -i "native-static[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native-static[$scalaJsVersion].testNative" && \
./mill -i "native-static[$scalaJsVersion].copyToArtifacts" artifacts/
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
Expand All @@ -82,6 +122,7 @@ jobs:
UPLOAD_GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

generate-mostly-static-launcher:
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -99,6 +140,7 @@ jobs:
- run: |
./mill -i "native-mostly-static[$scalaJsVersion].writeNativeImageScript" generate.sh "" && \
./generate.sh && \
./mill -i "native-mostly-static[$scalaJsVersion].testNative" && \
./mill -i "native-mostly-static[$scalaJsVersion].copyToArtifacts" artifacts/
env:
scalaJsVersion: ${{ matrix.scalaJsVersion }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.bsp/
out/
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2013-2014 EPFL
Copyright (c) 2017-2022 Scala.js Sébastien Doeraene

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the EPFL nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
GraalVM native image launchers of [scala-js-cli](https://github.com/scala-js/scala-js-cli) (linker only)
# Command Line Interface for Scala.js

Mainly meant to be used by [Scala CLI](https://github.com/VirtusLab/scala-cli) (see [`VirtusLab/scala-cli#676`](https://github.com/VirtusLab/scala-cli/pull/676))
`scalajs-cli` provides a Command Line Interface (CLI) to the Scala.js compiler
and linker.

Until Scala.js 1.0.0-M2, the CLI is part of the
[core repository of Scala.js](https://github.com/scala-js/scala-js).
This repository contains the CLI for later versions.


# GraalVM

Mainly meant to be used by [Scala CLI](https://github.com/VirtusLab/scala-cli) (see [`VirtusLab/scala-cli#676`](https://github.com/VirtusLab/scala-cli/pull/676))
Loading