Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ stages:

- task: Bash@3
displayName: 'Run Java Tests on Linux/macOS'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: change name since macOS is removed.

condition: and(succeeded(), in(variables['Agent.OS'], 'Linux', 'Darwin'))
# condition: and(succeeded(), in(variables['Agent.OS'], 'Linux', 'Darwin'))
# MacOS packages have been removed from the JAR here:
# https://github.com/microsoft/onnxruntime/commit/5ed340f7a51f3cbdb62577a874daf2b3f23d6a93#diff-a14cc5ea231eb4fa49f13510a242043c47ae48516c860f8a87b0e55762632f49
condition: and(succeeded(), in(variables['Agent.OS'], 'Linux'))
inputs:
targetType: 'inline'
script: |
Expand All @@ -85,7 +88,7 @@ stages:
ls $(Pipeline.Workspace)/build/tests
echo "Java Version"
java -version

# Set the correct library path based on the OS
os_name=$(uname)
if [[ "$os_name" == "Linux" ]]; then
Expand Down
4 changes: 3 additions & 1 deletion tools/ci_build/github/linux/java_linux_final_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,35 @@
do case "${parameter_Option}"
in
r) BINARY_DIR=${OPTARG};;
v) VERSION_NUMBER=${OPTARG};;

Check warning on line 14 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 VERSION_NUMBER appears unused. Verify use (or export if used externally). Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:14:4: warning: VERSION_NUMBER appears unused. Verify use (or export if used externally). (ShellCheck.SC2034)
*) usage ;;
esac
done

EXIT_CODE=1

Check warning on line 19 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 EXIT_CODE appears unused. Verify use (or export if used externally). Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:19:1: warning: EXIT_CODE appears unused. Verify use (or export if used externally). (ShellCheck.SC2034)

uname -a

cd "$BINARY_DIR/onnxruntime-java"
rm -f *.asc

Check warning on line 24 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:24:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
rm -f *.sha256

Check warning on line 25 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:25:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
rm -f *.sha1

Check warning on line 26 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:26:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
rm -f *.md5

Check warning on line 27 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:27:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
rm -f *.sha512

Check warning on line 28 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:28:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
rm -f *.pom

Check warning on line 29 in tools/ci_build/github/linux/java_linux_final_test.sh

View workflow job for this annotation

GitHub Actions / Optional Lint

[shellcheck] reported by reviewdog 🐶 Use ./*glob* or -- *glob* so names with dashes won't become options. Raw Output: ./tools/ci_build/github/linux/java_linux_final_test.sh:29:7: info: Use ./*glob* or -- *glob* so names with dashes won't become options. (ShellCheck.SC2035)
ls
cd ..
mkdir tests
cd tests
jar xf ../onnxruntime-java/testing.jar
rm -f ../onnxruntime-java/testing.jar
echo "Contents of tests directory ($BINARY_DIR/tests):"
ls "$BINARY_DIR/tests"
echo "Java Version"
java -version

echo "Directories created"
echo "Library path:" "$LD_LIBRARY_PATH"

java -DUSE_CUDA=1 -cp "$BINARY_DIR/tests:$BINARY_DIR/onnxruntime-java/*" org.junit.platform.console.ConsoleLauncher --scan-classpath=$BINARY_DIR/tests \
java -DUSE_CUDA=1 -cp "$BINARY_DIR/tests:$BINARY_DIR/onnxruntime-java/*" org.junit.platform.console.ConsoleLauncher --scan-classpath="$BINARY_DIR/tests" \
--fail-if-no-tests --disable-banner
4 changes: 1 addition & 3 deletions tools/ci_build/github/windows/jar_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ def run_packaging(package_type: str, build_dir: str):
]
},
"gpu": {
"platforms": [
{"path": "onnxruntime-java-linux-x64", "lib": "libcustom_op_library.so", "archive_lib": False}
]
"platforms": [{"path": "onnxruntime-java-linux-x64", "lib": "libcustom_op_library.so", "archive_lib": True}]
},
}

Expand Down
Loading