-
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.
- Loading branch information
Showing
2 changed files
with
35 additions
and
21 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 |
---|---|---|
|
@@ -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: [11] | ||
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] | ||
|