@@ -50,23 +50,23 @@ jobs:
50
50
- name : Build Android AAR Packages
51
51
run : |
52
52
set -e -x
53
- NDK_HOME =$(realpath $ANDROID_NDK_HOME )
53
+ ORT_VERSION =$(cat VERSION_NUMBER )
54
54
mkdir -p ${{ runner.temp }}/.build_settings
55
- mkdir -p ${{ runner.temp }}/. artifacts
55
+ mkdir -p ${{ runner.temp }}/artifacts
56
56
cp ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json
57
+ BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android${{ runner.temp }}_aar_package.py"
58
+ BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json"
57
59
58
- docker run --rm \
59
- --volume ${{ github.workspace }}:/onnxruntime_src \
60
- --volume $ANDROID_HOME:/android_home \
61
- --volume $NDK_HOME:/ndk_home \
62
- --volume ${{ runner.temp }}/.artifacts:/home/onnxruntimedev/.artifacts \
63
- --volume ${{ runner.temp }}/.build_settings:/home/onnxruntimedev/.build_settings \
64
- -e BUILD_CONFIG=Release \
65
- -e ORT_VERSION=${{ env.OnnxRuntimeVersion }} \
66
- -e PUBLISH_EXECUTABLES=0 \
67
- -e PACKAGE_NAME=onnxruntime-android \
68
- ${{ steps.build_docker_image_step.outputs.full-image-name }} \
69
- /bin/bash /onnxruntime_src/tools/ci_build/github/android/build_aar_and_copy_artifacts.sh 0
60
+
61
+ python3 -m pip install -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt
62
+
63
+ python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config $BUILD_CONFIG --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS
64
+
65
+ # Copy the built artifacts to give folder for publishing
66
+ BASE_PATH=${{ runner.temp }}/aar_out/${BUILD_CONFIG}/com/microsoft/onnxruntime/${PACKAGE_NAME}/${ORT_VERSION}
67
+ cp ${BASE_PATH}/*.jar ${{ runner.temp }}/artifacts
68
+ cp ${BASE_PATH}/*.aar ${{ runner.temp }}/artifacts
69
+ cp ${BASE_PATH}/*.pom ${{ runner.temp }}/artifacts
70
70
71
71
- name : Upload Android AAR Artifact
72
72
uses : actions/upload-artifact@v4
0 commit comments