-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Try to support automatic Windows installation.
This commits moves to using `gu install native-image` instead of `coursier launch --jvm graalvm svm`. The second approach doesn't appear to work well with Java 11.
- Loading branch information
Olafur Pall Geirsson
committed
Sep 9, 2020
1 parent
decc2b6
commit 566a471
Showing
3 changed files
with
38 additions
and
76 deletions.
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 |
---|---|---|
|
@@ -11,44 +11,27 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest] | ||
os: [ubuntu-latest, windows-latest] | ||
java: [8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v7 | ||
with: | ||
java-version: "adopt@1.${{ matrix.java }}" | ||
- shell: bash | ||
- name: sbt test plugin/scripted | ||
if: ${{ matrix.os }} != windows-latest | ||
shell: bash | ||
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 | ||
sbt test plugin/scripted | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure Pagefile | ||
uses: al-cheb/[email protected] | ||
- name: Refresh Pagefile | ||
run: | | ||
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize | ||
- uses: olafurpg/setup-scala@v7 | ||
with: | ||
java-version: [email protected] | ||
- name: gu install native-image | ||
shell: bash | ||
run: | | ||
echo $JAVA_HOME | ||
"$JAVA_HOME\bin\gu.cmd" install native-image | ||
- name: sbt test | ||
shell: cmd | ||
if: ${{ matrix.os }} == windows-latest | ||
run: >- | ||
"C:\Program Files (x86)\Microsoft Visual | ||
Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && sbt test | ||
Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && sbt | ||
example/nativeImage |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macOS-latest, ubuntu-latest] | ||
os: [macOS-latest, ubuntu-latest, windows-latest] | ||
include: | ||
# Replace "example" with the name your binary | ||
- os: macOS-latest | ||
|
@@ -21,53 +21,19 @@ jobs: | |
- os: ubuntu-latest | ||
artifact: example-x86_64-pc-linux | ||
binary: example/target/native-image/example | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: olafurpg/setup-scala@v6 | ||
- run: git fetch --tags || true | ||
- run: sbt example/nativeImage | ||
- uses: actions/upload-artifact@master | ||
with: | ||
path: ${{ matrix.binary }} | ||
name: ${{ matrix.artifact }} | ||
- name: Upload release | ||
if: github.event_name == 'release' | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ matrix.binary }} | ||
asset_name: ${{ matrix.artifact }} | ||
asset_content_type: application/zip | ||
windows: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
include: | ||
# Replace "example" with the name your binary | ||
- os: windows-latest | ||
artifact: example-x86_64-pc-win32.exe | ||
binary: example\target\native-image\example.exe | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Configure Pagefile | ||
uses: al-cheb/[email protected] | ||
- name: Refresh Pagefile | ||
run: | | ||
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize | ||
- uses: olafurpg/setup-scala@v7 | ||
with: | ||
java-version: [email protected] | ||
- name: gu install native-image | ||
- uses: olafurpg/setup-scala@v6 | ||
- run: git fetch --tags || true | ||
- run: sbt example/nativeImage | ||
shell: bash | ||
run: | | ||
echo $JAVA_HOME | ||
"$JAVA_HOME\bin\gu.cmd" install native-image | ||
if: ${{ matrix.os }} != windows-latest | ||
- name: sbt test | ||
shell: cmd | ||
if: ${{ matrix.os }} == windows-latest | ||
run: >- | ||
"C:\Program Files (x86)\Microsoft Visual | ||
Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && sbt | ||
|
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