-
Notifications
You must be signed in to change notification settings - Fork 23
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
Give some love to the project #70
Open
guizmaii
wants to merge
10
commits into
scalameta:main
Choose a base branch
from
guizmaii:support_new_graalvm_builds
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f233a78
Give some love to the project
guizmaii a177ab5
try to avoid CI failures
guizmaii 1d5f26b
Update example projects
guizmaii 4ba6939
clean
guizmaii f8cee7a
Try fix scripted tests
guizmaii 7f29c8e
deps: bump default nativeImageVersion to 22.3.0
ckipp01 8a0cb20
refactor: update tests to use 2.13.11
ckipp01 e8bfe1d
refactor: remove local scala-steward config
ckipp01 101b85e
refactor: start using setup-graal
ckipp01 b8012a5
fix: get rid of stray folder screwing up test
ckipp01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ name: CI | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
native-image: | ||
name: Compile | ||
|
@@ -13,33 +13,41 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest, windows-latest] | ||
java: [8] | ||
java: ['17.0.7'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: olafurpg/setup-scala@v13 | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: "adopt@1.${{ matrix.java }}" | ||
- name: Setup Windows C++ toolchain | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
java-version: ${{ matrix.java }} | ||
cache: sbt | ||
components: native-image | ||
|
||
- name: sbt test plugin/scripted | ||
if: ${{ matrix.os == 'ubuntu-latest' }} | ||
shell: bash | ||
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} | ||
env: | ||
NATIVE_IMAGE_COMMAND: native-image | ||
run: | | ||
export JABBA=/home/runner/bin/jabba | ||
$JABBA install [email protected] | ||
export GRAALVM_HOME=$($JABBA which --home [email protected]) | ||
$GRAALVM_HOME/bin/gu install native-image | ||
export NATIVE_IMAGE_COMMAND=$GRAALVM_HOME/bin/native-image | ||
# Copied from https://github.com/graalvm/setup-graalvm#quickstart-template | ||
echo "GRAALVM_HOME: $GRAALVM_HOME" | ||
echo "JAVA_HOME: $JAVA_HOME" | ||
java --version | ||
native-image --version | ||
sbt test plugin/scripted | ||
- name: sbt test | ||
shell: bash | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
sbt example/nativeImage | ||
|
||
# - name: sbt test | ||
# shell: bash | ||
# if: ${{ matrix.os == 'windows-latest' }} | ||
# run: | | ||
# sbt example/nativeImage | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: olafurpg/setup-scala@v13 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '17' | ||
cache: 'sbt' | ||
- run: sbt checkAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ name: Native Image | |
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
native-image: | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -29,6 +29,7 @@ jobs: | |
# define Java options for both official sbt and sbt-extras | ||
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | ||
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup JDK | ||
|
@@ -37,19 +38,24 @@ jobs: | |
distribution: temurin | ||
java-version: 8 | ||
cache: sbt | ||
|
||
- run: git fetch --tags || true | ||
|
||
- name: Setup Windows C++ toolchain | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
|
||
- name: Build | ||
shell: bash | ||
run: | | ||
echo $(pwd) | ||
sbt clean example/nativeImage | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
path: ${{ matrix.local_path }} | ||
name: ${{ matrix.uploaded_filename }} | ||
|
||
- name: Upload release | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
def scala212 = "2.12.12" | ||
def scala212 = "2.12.18" | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges | ||
|
||
inThisBuild( | ||
List( | ||
organization := "org.scalameta", | ||
|
@@ -15,16 +18,14 @@ inThisBuild( | |
) | ||
), | ||
scalaVersion := scala212, | ||
scalafixDependencies += | ||
"com.github.liancheng" %% "organize-imports" % "0.5.0", | ||
ckipp01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
scalacOptions ++= List("-Ywarn-unused-import"), | ||
scalafixCaching := true, | ||
semanticdbEnabled := true | ||
) | ||
) | ||
|
||
crossScalaVersions := Nil | ||
skip.in(publish) := true | ||
publish / skip := true | ||
|
||
commands += | ||
Command.command("fixAll") { s => | ||
|
@@ -42,7 +43,6 @@ lazy val plugin = project | |
.settings( | ||
moduleName := "sbt-native-image", | ||
sbtPlugin := true, | ||
sbtVersion.in(pluginCrossBuild) := "1.0.0", | ||
crossScalaVersions := List(scala212), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this still needed at all? |
||
buildInfoPackage := "sbtnativeimage", | ||
buildInfoKeys := Seq[BuildInfoKey](version), | ||
|
@@ -55,8 +55,8 @@ lazy val plugin = project | |
lazy val example = project | ||
.in(file("example")) | ||
.settings( | ||
skip.in(publish) := true, | ||
mainClass.in(Compile) := Some("example.Hello"), | ||
publish / skip := true, | ||
Compile / mainClass := Some("example.Hello"), | ||
test := { | ||
val binary = nativeImage.value | ||
val output = scala.sys.process.Process(List(binary.toString)).!!.trim | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nit, but we are sort of mixing styles with how we have this setting defined and how we have the ones below defined. Can we change this to
Just to be consistent with how we do the
DisableSyntax
down below. We can do the same withDisable.ifSynthetic