-
Notifications
You must be signed in to change notification settings - Fork 241
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
1 parent
5815433
commit 5731ceb
Showing
18 changed files
with
486 additions
and
28 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bash | ||
set -eu | ||
|
||
SCALA_CLI="scala-cli" | ||
RUN_APP="./run" | ||
|
||
if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "MINGW" ]; then | ||
SCALA_CLI="$SCALA_CLI.bat" | ||
RUN_APP="$RUN_APP.exe" | ||
fi | ||
|
||
checkResults() { | ||
RESULTS="$(jq -r '.[1] | map(.status) | join("\n")' < test-output.json | sort -u)" | ||
if [ "$RESULTS" != "Success" ]; then | ||
exit 1 | ||
fi | ||
} | ||
|
||
"$SCALA_CLI" --power package --server=false .github/scripts/run --native-image -o "$RUN_APP" | ||
|
||
function exitHook() { | ||
echo jps -mlv | ||
jps -mlv | ||
} | ||
trap exitHook EXIT | ||
|
||
# Seems native-image sends its output to stdout, which borks the command JSON output | ||
# So we run the show command a first time, so that native-image can run, before actually | ||
# saving its output. | ||
./mill -i show "scala.integration.native.test.testCommand" | ||
./mill -i show "scala.integration.native.test.testCommand" > test-args.json | ||
cat test-args.json | ||
"$RUN_APP" test-args.json | ||
checkResults |
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 |
---|---|---|
|
@@ -84,6 +84,39 @@ jobs: | |
- run: .github/scripts/run/run-its.sh | ||
shell: bash | ||
|
||
native-integration-tests: | ||
runs-on: ${{ matrix.OS }} | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
OS: [ubuntu-latest, macos-12, windows-latest] | ||
steps: | ||
- name: Don't convert LF to CRLF during checkout | ||
if: runner.os == 'Windows' | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- uses: coursier/[email protected] | ||
- uses: coursier/[email protected] | ||
with: | ||
jvm: 8 | ||
apps: scala-cli | ||
- name: Copy launcher | ||
run: ./mill -i ci.copyNativeLauncher artifacts/ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: launchers | ||
path: artifacts/ | ||
if-no-files-found: error | ||
retention-days: 2 | ||
- run: .github/scripts/run/run-its-native.sh | ||
shell: bash | ||
|
||
bincompat: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -152,7 +185,7 @@ jobs: | |
# job whose name doesn't change when we bump Scala versions, add OSes, … | ||
# We require this job for auto-merge. | ||
all-tests: | ||
needs: [examples, bincompat, test, integration-tests, website, publishLocal] | ||
needs: [examples, bincompat, test, integration-tests, native-integration-tests, website, publishLocal] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true | ||
|
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 |
---|---|---|
|
@@ -56,6 +56,58 @@ jobs: | |
env: | ||
UPLOAD_GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
build-native-launchers: | ||
runs-on: ${{ matrix.OS }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
OS: [ubuntu-latest, macos-12] | ||
steps: | ||
- name: Don't convert LF to CRLF during checkout | ||
if: runner.os == 'Windows' | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- uses: coursier/[email protected] | ||
- uses: coursier/[email protected] | ||
with: | ||
jvm: 8 | ||
apps: | ||
- name: Copy launcher | ||
run: ./mill -i ci.copyNativeLauncher artifacts/ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: native-launchers | ||
path: artifacts/ | ||
if-no-files-found: error | ||
retention-days: 2 | ||
|
||
upload-native-launchers: | ||
needs: build-native-launchers | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- uses: coursier/[email protected] | ||
- uses: coursier/[email protected] | ||
with: | ||
jvm: 8 | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: launchers | ||
path: artifacts/ | ||
- run: ./mill -i ci.uploadNativeLaunchers | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
shell: bash | ||
env: | ||
UPLOAD_GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
|
||
update-docker-images: | ||
needs: release | ||
runs-on: ubuntu-latest | ||
|
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
10 changes: 10 additions & 0 deletions
10
...ntegration/native/src/test/scala/almond/integration/KernelTestsNativeTwoStepStartup.scala
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package almond.integration | ||
|
||
class KernelTestsNativeTwoStepStartup extends KernelTestsTwoStepStartupDefinitions { | ||
|
||
lazy val kernelLauncher = | ||
new KernelLauncher(KernelLauncher.LauncherType.Native, KernelLauncher.testScala213Version) | ||
|
||
override def mightRetry = true | ||
|
||
} |
Oops, something went wrong.