From af9e08f21f4cf98be419c064c2b294a7f9cfec3c Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 17:08:35 -0700 Subject: [PATCH 01/27] add RN pipeline --- .github/workflows/react_native.yml | 341 +++++++++++++++++++++++++++++ 1 file changed, 341 insertions(+) create mode 100644 .github/workflows/react_native.yml diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml new file mode 100644 index 0000000000000..28294d244309f --- /dev/null +++ b/.github/workflows/react_native.yml @@ -0,0 +1,341 @@ +name: React Native CI Pipeline + +on: + push: + branches: + - main + - 'rel-*' + paths: + - '!docs/**' + - '!README.md' + - '!CONTRIBUTING.md' + - '!BUILD.md' + - '!js/web/**' + - '!onnxruntime/core/providers/js/**' + pull_request: + branches: + - main + - 'rel-*' + paths: + - '!docs/**' + - '!README.md' + - '!CONTRIBUTING.md' + - '!BUILD.md' + - '!js/web/**' + - '!onnxruntime/core/providers/js/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} + cancel-in-progress: true + +jobs: + build_android_packages: + name: Build Android AAR Packages + runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"] + timeout-minutes: 120 + outputs: + aar_path: ${{ runner.temp }}/.artifacts + steps: + - name: Checkout repository + uses: actions/checkout@v5 + with: + submodules: false + + - name: Get Docker Image + id: build_docker_image_step + uses: microsoft/onnxruntime-github-actions/build-docker-image@v0.0.8 + with: + dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/Dockerfile + image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecpubuildcentos8x64_packaging + push: true + azure-container-registry-name: onnxruntimebuildcache + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set version number variables + id: set_versions + run: | + echo "OnnxRuntimeVersion=$(head -1 VERSION_NUMBER)" >> $GITHUB_ENV + echo "OnnxRuntimeGitCommitHash=$(git rev-parse HEAD)" >> $GITHUB_ENV + echo "OnnxRuntimeGitCommitHashShort=$(git rev-parse --short=8 HEAD)" >> $GITHUB_ENV + + - name: Setup Android NDK + uses: ./.github/actions/setup-android-ndk + with: + ndk-version: 28.0.13004108 + + - name: Build Android AAR Packages + run: | + set -e -x + NDK_HOME=$(realpath $ANDROID_NDK_HOME) + mkdir -p ${{ runner.temp }}/.build_settings + cp ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json + + docker run --rm \ + --volume ${{ github.workspace }}:/onnxruntime_src \ + --volume ${{ runner.temp }}:/build \ + --volume $ANDROID_HOME:/android_home \ + --volume $NDK_HOME:/ndk_home \ + --volume ${{ runner.temp }}/.artifacts:/home/onnxruntimedev/.artifacts \ + --volume ${{ runner.temp }}/.build_settings:/home/onnxruntimedev/.build_settings \ + -e BUILD_CONFIG=Release \ + -e ORT_VERSION=${{ env.OnnxRuntimeVersion }} \ + -e PUBLISH_EXECUTABLES=0 \ + -e PACKAGE_NAME=onnxruntime-android \ + ${{ steps.build_docker_image_step.outputs.full-image-name }} \ + /bin/bash /onnxruntime_src/tools/ci_build/github/android/build_aar_and_copy_artifacts.sh 0 + + - name: Upload Android AAR Artifact + uses: actions/upload-artifact@v4 + with: + name: onnxruntime-android-full-aar + path: ${{ runner.temp }}/.artifacts + + react_native_ci_android: + name: React Native CI Android + needs: build_android_packages + runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"] + timeout-minutes: 90 + env: + ANDROID_AVD_HOME: ${{ runner.temp }} + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Use Python 3.12 + uses: actions/setup-python@v6 + with: + python-version: "3.12" + architecture: "x64" + + - name: Use Java 17 (Temurin) + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '17' + architecture: x64 + + - name: Use Node.js 22.x + uses: actions/setup-node@v5 + with: + node-version: '22.x' + + - name: Install ninja + run: sudo apt-get update && sudo apt-get install -y ninja-build + + - name: Download Android AAR artifacts + uses: actions/download-artifact@v4 + with: + name: onnxruntime-android-full-aar + path: ${{ runner.temp }}/android-full-aar + + - name: Copy AAR to React Native and E2E directories + run: | + mkdir -p ${{ github.workspace }}/js/react_native/android/libs + cp ${{ runner.temp }}/android-full-aar/*.aar ${{ github.workspace }}/js/react_native/android/libs + mkdir -p ${{ github.workspace }}/js/react_native/e2e/android/app/libs + cp ${{ runner.temp }}/android-full-aar/*.aar ${{ github.workspace }}/js/react_native/e2e/android/app/libs + + - name: Install dependencies and bootstrap + run: | + npm install -g detox-cli + npm ci + working-directory: ${{ github.workspace }}/js + - run: npm ci + working-directory: ${{ github.workspace }}/js/common + - run: | + npm ci + npm run bootstrap-no-pods + working-directory: ${{ github.workspace }}/js/react_native + + - name: Generate a debug keystore + run: | + keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android \ + -keypass android -keyalg RSA -keysize 2048 -validity 999999 -dname "CN=Android Debug,O=Android,C=US" + working-directory: ${{ github.workspace }}/js/react_native/e2e/android + + - name: Build React Native Detox Android e2e Tests + run: detox build --configuration android.emu.release + working-directory: ${{ github.workspace }}/js/react_native/e2e + + - name: Setup Android Emulator + uses: ./.github/actions/setup-android-ndk + with: + ndk-version: 28.0.13004108 + + - name: Start Android Emulator + run: | + if test -f ./emulator.pid; then + echo "Emulator PID file was not expected to exist but does and has pid: $(cat ./emulator.pid)" + exit 1 + fi + python3 tools/python/run_android_emulator.py \ + --android-sdk-root "${ANDROID_SDK_ROOT}" \ + --start --emulator-extra-args="-partition-size 2047" \ + --emulator-pid-file ./emulator.pid + echo "Emulator PID: $(cat ./emulator.pid)" + + - name: Run React Native Android Instrumented Tests + run: ./gradlew connectedDebugAndroidTest --stacktrace + working-directory: ${{ github.workspace }}/js/react_native/android + + - name: Run React Native Detox Android e2e Tests + run: | + JEST_JUNIT_OUTPUT_FILE=${{ github.workspace }}/js/react_native/e2e/android-test-results.xml \ + detox test --record-logs all \ + --configuration android.emu.release \ + --loglevel trace \ + --take-screenshots failing + working-directory: ${{ github.workspace }}/js/react_native/e2e + + - name: Install psutil and Stop Android Emulator + if: always() + run: | + python3 -m pip install psutil + if test -f ./emulator.pid; then + echo "Emulator PID: $(cat ./emulator.pid)" + python3 tools/python/run_android_emulator.py \ + --android-sdk-root "${ANDROID_SDK_ROOT}" \ + --stop \ + --emulator-pid-file ./emulator.pid + rm ./emulator.pid + else + echo "Emulator PID file was expected to exist but does not." + fi + + react_native_ci_ios_build: + name: React Native CI iOS Build + runs-on: macos-14 + timeout-minutes: 120 + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Use Xcode 15.3.0 + run: sudo xcode-select --switch /Applications/Xcode_15.3.0.app/Contents/Developer + + - name: Use Python 3.12 + uses: actions/setup-python@v6 + with: + python-version: "3.12" + architecture: "x64" + + - name: Install Python requirements + run: pip install -r tools/ci_build/github/apple/ios_packaging/requirements.txt + + - name: Build iOS package and assemble pods + run: | + set -e -x + python ${{ github.workspace }}/tools/ci_build/github/apple/build_and_assemble_apple_pods.py \ + --build-dir "${{ runner.temp }}/ios_framework_full" \ + --staging-dir "${{ runner.temp }}/ios_pod" \ + --build-settings-file ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json + + - name: Upload iOS Pod Artifact + uses: actions/upload-artifact@v4 + with: + name: ios_pod + path: ${{ runner.temp }}/ios_pod + + react_native_ci_ios_unit_tests: + name: React Native CI iOS Unit Tests + needs: react_native_ci_ios_build + runs-on: macos-14 + timeout-minutes: 90 + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Download iOS pod artifact + uses: actions/download-artifact@v4 + with: + name: ios_pod + path: ${{ runner.temp }}/ios_pod + + - name: Use Xcode 15.3.0 + run: sudo xcode-select --switch /Applications/Xcode_15.3.0.app/Contents/Developer + + - name: Use Node.js 22.x + uses: actions/setup-node@v5 + with: + node-version: '22.x' + + - name: Install dependencies and bootstrap + run: | + npm ci + working-directory: ${{ github.workspace }}/js + - run: npm ci + working-directory: ${{ github.workspace }}/js/common + - run: | + npm ci + npm run bootstrap-no-pods + working-directory: ${{ github.workspace }}/js/react_native + + - name: Pod install + run: | + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c \ + pod install + working-directory: ${{ github.workspace }}/js/react_native/ios + + - name: Run React Native iOS Instrumented Tests + run: | + set -o pipefail && xcodebuild test \ + -workspace OnnxruntimeModule.xcworkspace \ + -scheme OnnxruntimeModuleTest \ + -sdk iphonesimulator \ + -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \ + | xcpretty --report junit --output build/reports/test-results.xml + working-directory: ${{ github.workspace }}/js/react_native/ios + + react_native_ci_ios_e2e_tests: + name: React Native CI iOS E2E Tests + needs: react_native_ci_ios_build + runs-on: macos-14 + timeout-minutes: 90 + steps: + - name: Checkout repository + uses: actions/checkout@v5 + + - name: Download iOS pod artifact + uses: actions/download-artifact@v4 + with: + name: ios_pod + path: ${{ runner.temp }}/ios_pod + + - name: Use Xcode 15.3.0 + run: sudo xcode-select --switch /Applications/Xcode_15.3.0.app/Contents/Developer + + - name: Use Node.js 22.x + uses: actions/setup-node@v5 + with: + node-version: '22.x' + + - name: Install dependencies and bootstrap + run: | + npm install -g detox-cli + brew tap wix/brew + brew install applesimutils + npm ci + working-directory: ${{ github.workspace }}/js + - run: npm ci + working-directory: ${{ github.workspace }}/js/common + - run: | + npm ci + npm run bootstrap-no-pods + working-directory: ${{ github.workspace }}/js/react_native + + - name: Pod install for e2e tests + run: | + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c \ + pod install + working-directory: ${{ github.workspace }}/js/react_native/e2e/ios + + - name: Build and Run Detox iOS e2e Tests + run: | + detox build --configuration ios.sim.release + JEST_JUNIT_OUTPUT_FILE=${{ github.workspace }}/js/react_native/e2e/ios-test-results.xml \ + detox test --record-logs all \ + --configuration ios.sim.release \ + --loglevel verbose \ + --take-screenshots failing + working-directory: ${{ github.workspace }}/js/react_native/e2e \ No newline at end of file From abf995f1d45a3b1e7de9743f4c9809edeb3b15ff Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 17:58:13 -0700 Subject: [PATCH 02/27] update --- .github/workflows/react_native.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 28294d244309f..78c8edd209d57 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -96,9 +96,10 @@ jobs: needs: build_android_packages runs-on: ["self-hosted", "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"] timeout-minutes: 90 - env: - ANDROID_AVD_HOME: ${{ runner.temp }} steps: + - name: Set ANDROID_AVD_HOME environment variable + run: echo "ANDROID_AVD_HOME=${{ runner.temp }}" >> $GITHUB_ENV + - name: Checkout repository uses: actions/checkout@v5 From 80bbb4e54f26c8bd7229cfcd9151cecf36c0abdf Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 18:09:33 -0700 Subject: [PATCH 03/27] remove --- .../mac-react-native-ci-pipeline.yml | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 tools/ci_build/github/azure-pipelines/mac-react-native-ci-pipeline.yml diff --git a/tools/ci_build/github/azure-pipelines/mac-react-native-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/mac-react-native-ci-pipeline.yml deleted file mode 100644 index c71cd95150aa6..0000000000000 --- a/tools/ci_build/github/azure-pipelines/mac-react-native-ci-pipeline.yml +++ /dev/null @@ -1,59 +0,0 @@ -##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py #### -### please do rerun set-trigger-rules.py ### -trigger: - branches: - include: - - main - - rel-* - paths: - exclude: - - docs/** - - README.md - - CONTRIBUTING.md - - BUILD.md - - 'js/web' - - 'onnxruntime/core/providers/js' -pr: - branches: - include: - - main - - rel-* - paths: - exclude: - - docs/** - - README.md - - CONTRIBUTING.md - - BUILD.md - - 'js/web' - - 'onnxruntime/core/providers/js' -#### end trigger #### - -parameters: -- name: NpmPublish - displayName: 'NPM packages publish configuration' - type: string - values: - - 'nightly (@dev)' - - 'release candidate (@rc)' - - 'production (@latest)' - - 'custom' - default: 'nightly (@dev)' - -variables: - skipComponentGovernanceDetection: true - ${{ if eq(parameters.NpmPublish, 'nightly (@dev)') }}: - NpmPackagingMode: 'dev' - ${{ if eq(parameters.NpmPublish, 'release candidate (@rc)') }}: - NpmPackagingMode: 'rc' - ${{ if eq(parameters.NpmPublish, 'production (@latest)') }}: - NpmPackagingMode: 'release' - ${{ if eq(parameters.NpmPublish, 'custom') }}: - NpmPackagingMode: '$(VersionSuffix)' - -stages: -- template: templates/react-native-ci.yml - parameters: - NpmPackagingMode: ${{ variables.NpmPackagingMode }} - BuildConfig: 'Release' - PoolName: 'onnxruntime-Ubuntu2404-AMD-CPU' - enable_code_sign: false From c7602d8ed6e6c944941f682f0a8e61e1e0095709 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 18:15:57 -0700 Subject: [PATCH 04/27] add dispatch --- .github/workflows/react_native.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 78c8edd209d57..a7f24b3172037 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -23,6 +23,7 @@ on: - '!BUILD.md' - '!js/web/**' - '!onnxruntime/core/providers/js/**' + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }} From c18ea795b5637a77696cfa51c8acd57cc8e010f1 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 18:19:18 -0700 Subject: [PATCH 05/27] reset trigger --- .github/workflows/react_native.yml | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index a7f24b3172037..e6ed7013f2829 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -2,27 +2,9 @@ name: React Native CI Pipeline on: push: - branches: - - main - - 'rel-*' - paths: - - '!docs/**' - - '!README.md' - - '!CONTRIBUTING.md' - - '!BUILD.md' - - '!js/web/**' - - '!onnxruntime/core/providers/js/**' + branches: [main, 'rel-*'] pull_request: - branches: - - main - - 'rel-*' - paths: - - '!docs/**' - - '!README.md' - - '!CONTRIBUTING.md' - - '!BUILD.md' - - '!js/web/**' - - '!onnxruntime/core/providers/js/**' + branches: [main, 'rel-*'] workflow_dispatch: concurrency: From 6b9724cf04ced5b934167a9abdd8bebc8306d56b Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Mon, 15 Sep 2025 19:00:01 -0700 Subject: [PATCH 06/27] update --- .github/workflows/react_native.yml | 45 ++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index e6ed7013f2829..281fce0ca1b32 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -52,6 +52,7 @@ jobs: set -e -x NDK_HOME=$(realpath $ANDROID_NDK_HOME) mkdir -p ${{ runner.temp }}/.build_settings + mkdir -p ${{ runner.temp }}/.artifacts cp ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json docker run --rm \ @@ -207,9 +208,17 @@ jobs: - name: Install Python requirements run: pip install -r tools/ci_build/github/apple/ios_packaging/requirements.txt + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + with: + vcpkg-version: '2025.06.13' + vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc + cmake-version: '3.31.8' + cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8 + add-cmake-to-path: 'true' + disable-terrapin: 'true' + - name: Build iOS package and assemble pods run: | - set -e -x python ${{ github.workspace }}/tools/ci_build/github/apple/build_and_assemble_apple_pods.py \ --build-dir "${{ runner.temp }}/ios_framework_full" \ --staging-dir "${{ runner.temp }}/ios_pod" \ @@ -243,7 +252,16 @@ jobs: uses: actions/setup-node@v5 with: node-version: '22.x' - + + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + with: + vcpkg-version: '2025.06.13' + vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc + cmake-version: '3.31.8' + cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8 + add-cmake-to-path: 'true' + disable-terrapin: 'true' + - name: Install dependencies and bootstrap run: | npm ci @@ -251,24 +269,23 @@ jobs: - run: npm ci working-directory: ${{ github.workspace }}/js/common - run: | + set -e -x npm ci npm run bootstrap-no-pods working-directory: ${{ github.workspace }}/js/react_native - name: Pod install run: | - ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c \ - pod install + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install working-directory: ${{ github.workspace }}/js/react_native/ios - name: Run React Native iOS Instrumented Tests run: | - set -o pipefail && xcodebuild test \ + xcodebuild test \ -workspace OnnxruntimeModule.xcworkspace \ -scheme OnnxruntimeModuleTest \ -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \ - | xcpretty --report junit --output build/reports/test-results.xml + -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' working-directory: ${{ github.workspace }}/js/react_native/ios react_native_ci_ios_e2e_tests: @@ -294,8 +311,18 @@ jobs: with: node-version: '22.x' + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + with: + vcpkg-version: '2025.06.13' + vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc + cmake-version: '3.31.8' + cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8 + add-cmake-to-path: 'true' + disable-terrapin: 'true' + - name: Install dependencies and bootstrap run: | + set -e -x npm install -g detox-cli brew tap wix/brew brew install applesimutils @@ -304,14 +331,14 @@ jobs: - run: npm ci working-directory: ${{ github.workspace }}/js/common - run: | + set -e -x npm ci npm run bootstrap-no-pods working-directory: ${{ github.workspace }}/js/react_native - name: Pod install for e2e tests run: | - ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c \ - pod install + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install working-directory: ${{ github.workspace }}/js/react_native/e2e/ios - name: Build and Run Detox iOS e2e Tests From 12e1e1000ae258154afe53d14a3ed1d35cb4ea0d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 10:52:40 -0700 Subject: [PATCH 07/27] remove a mount --- .github/workflows/react_native.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 281fce0ca1b32..87b83caee99de 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -57,7 +57,6 @@ jobs: docker run --rm \ --volume ${{ github.workspace }}:/onnxruntime_src \ - --volume ${{ runner.temp }}:/build \ --volume $ANDROID_HOME:/android_home \ --volume $NDK_HOME:/ndk_home \ --volume ${{ runner.temp }}/.artifacts:/home/onnxruntimedev/.artifacts \ From 44c9fc5145389694319764627e5cbddcdb6125ad Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 12:33:10 -0700 Subject: [PATCH 08/27] update --- .github/workflows/react_native.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 87b83caee99de..5f6b8c56adb46 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -50,23 +50,23 @@ jobs: - name: Build Android AAR Packages run: | set -e -x - NDK_HOME=$(realpath $ANDROID_NDK_HOME) + ORT_VERSION=$(cat VERSION_NUMBER) mkdir -p ${{ runner.temp }}/.build_settings - mkdir -p ${{ runner.temp }}/.artifacts + mkdir -p ${{ runner.temp }}/artifacts cp ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json + BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android${{ runner.temp }}_aar_package.py" + BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" - docker run --rm \ - --volume ${{ github.workspace }}:/onnxruntime_src \ - --volume $ANDROID_HOME:/android_home \ - --volume $NDK_HOME:/ndk_home \ - --volume ${{ runner.temp }}/.artifacts:/home/onnxruntimedev/.artifacts \ - --volume ${{ runner.temp }}/.build_settings:/home/onnxruntimedev/.build_settings \ - -e BUILD_CONFIG=Release \ - -e ORT_VERSION=${{ env.OnnxRuntimeVersion }} \ - -e PUBLISH_EXECUTABLES=0 \ - -e PACKAGE_NAME=onnxruntime-android \ - ${{ steps.build_docker_image_step.outputs.full-image-name }} \ - /bin/bash /onnxruntime_src/tools/ci_build/github/android/build_aar_and_copy_artifacts.sh 0 + + python3 -m pip install -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt + + python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config $BUILD_CONFIG --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS + + # Copy the built artifacts to give folder for publishing + BASE_PATH=${{ runner.temp }}/aar_out/${BUILD_CONFIG}/com/microsoft/onnxruntime/${PACKAGE_NAME}/${ORT_VERSION} + cp ${BASE_PATH}/*.jar ${{ runner.temp }}/artifacts + cp ${BASE_PATH}/*.aar ${{ runner.temp }}/artifacts + cp ${BASE_PATH}/*.pom ${{ runner.temp }}/artifacts - name: Upload Android AAR Artifact uses: actions/upload-artifact@v4 From 76d47d1e76dcdf9e87ba44b4d8923d43d6885156 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 15:26:52 -0700 Subject: [PATCH 09/27] update --- .github/workflows/react_native.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 5f6b8c56adb46..d4622121702c9 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -57,8 +57,7 @@ jobs: BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android${{ runner.temp }}_aar_package.py" BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" - - python3 -m pip install -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt + python3 -m pip install --user -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config $BUILD_CONFIG --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS From 3c3e5255291672e1bb90127261274e14d1c6d6d5 Mon Sep 17 00:00:00 2001 From: Gemini Date: Tue, 16 Sep 2025 19:35:24 -0700 Subject: [PATCH 10/27] update --- .github/workflows/react_native.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index d4622121702c9..2788cf517b995 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -53,9 +53,9 @@ jobs: ORT_VERSION=$(cat VERSION_NUMBER) mkdir -p ${{ runner.temp }}/.build_settings mkdir -p ${{ runner.temp }}/artifacts - cp ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json - BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android${{ runner.temp }}_aar_package.py" - BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" + cp tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json + export BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py" + export BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" python3 -m pip install --user -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt From 15c3438c5018fa4027739bfab6bcf6d9c5cb72e1 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 21:39:41 -0700 Subject: [PATCH 11/27] stash --- .github/workflows/react_native.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 2788cf517b995..1de2bc6cdb3e5 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -54,15 +54,15 @@ jobs: mkdir -p ${{ runner.temp }}/.build_settings mkdir -p ${{ runner.temp }}/artifacts cp tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json - export BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py" - export BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" + BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py" + BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" python3 -m pip install --user -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt - python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config $BUILD_CONFIG --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS + python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config Release --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS # Copy the built artifacts to give folder for publishing - BASE_PATH=${{ runner.temp }}/aar_out/${BUILD_CONFIG}/com/microsoft/onnxruntime/${PACKAGE_NAME}/${ORT_VERSION} + BASE_PATH=${{ runner.temp }}/aar_out/Release/com/microsoft/onnxruntime/onnxruntime-android/${ORT_VERSION} cp ${BASE_PATH}/*.jar ${{ runner.temp }}/artifacts cp ${BASE_PATH}/*.aar ${{ runner.temp }}/artifacts cp ${BASE_PATH}/*.pom ${{ runner.temp }}/artifacts From 29ee20770c8027cd288ede6e8bee39b887862e2d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 22:41:55 -0700 Subject: [PATCH 12/27] update --- .github/workflows/react_native.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 1de2bc6cdb3e5..25e753db610d9 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -54,12 +54,10 @@ jobs: mkdir -p ${{ runner.temp }}/.build_settings mkdir -p ${{ runner.temp }}/artifacts cp tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json - BUILD_SCRIPT="${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py" - BUILD_SETTINGS="${{ runner.temp }}/.build_settings/build_settings.json" python3 -m pip install --user -r ${{ github.workspace }}/tools/ci_build/requirements/pybind/requirements.txt - python3 $BUILD_SCRIPT --build_dir ${{ runner.temp }} --config Release --android_sdk_path $ANDROID_SDK_HOME --android_ndk_path $ANDROID_NDK_HOME $BUILD_SETTINGS + python3 ${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py --build_dir ${{ runner.temp }} --config Release --android_sdk_path $ANDROID_SDK_ROOT --android_ndk_path $ANDROID_NDK_ROOT ${{ runner.temp }}/.build_settings/build_settings.json # Copy the built artifacts to give folder for publishing BASE_PATH=${{ runner.temp }}/aar_out/Release/com/microsoft/onnxruntime/onnxruntime-android/${ORT_VERSION} @@ -71,7 +69,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: onnxruntime-android-full-aar - path: ${{ runner.temp }}/.artifacts + path: ${{ runner.temp }}/artifacts react_native_ci_android: name: React Native CI Android From 413bd66037f0683b9a8b501f224b8c148983c6d4 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 22:56:02 -0700 Subject: [PATCH 13/27] update --- .github/workflows/react_native.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 25e753db610d9..6de17bf6f1b33 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -24,17 +24,6 @@ jobs: with: submodules: false - - name: Get Docker Image - id: build_docker_image_step - uses: microsoft/onnxruntime-github-actions/build-docker-image@v0.0.8 - with: - dockerfile: ${{ github.workspace }}/tools/ci_build/github/linux/docker/inference/x86_64/default/cpu/Dockerfile - image-name: ghcr.io/microsoft/onnxruntime/onnxruntimecpubuildcentos8x64_packaging - push: true - azure-container-registry-name: onnxruntimebuildcache - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Set version number variables id: set_versions run: | @@ -47,10 +36,18 @@ jobs: with: ndk-version: 28.0.13004108 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + with: + vcpkg-version: '2025.06.13' + vcpkg-hash: '735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc' + cmake-version: '3.31.6' + cmake-hash: '42395e20b10a8e9ef3e33014f9a4eed08d46ab952e02d2c1bbc8f6133eca0d7719fb75680f9bbff6552f20fcd1b73d86860f7f39388d631f98fb6f622b37cf04' + add-cmake-to-path: 'true' + disable-terrapin: 'true' + - name: Build Android AAR Packages run: | set -e -x - ORT_VERSION=$(cat VERSION_NUMBER) mkdir -p ${{ runner.temp }}/.build_settings mkdir -p ${{ runner.temp }}/artifacts cp tools/ci_build/github/js/react_native_e2e_full_aar_build_settings.json ${{ runner.temp }}/.build_settings/build_settings.json @@ -60,7 +57,7 @@ jobs: python3 ${{ github.workspace }}/tools/ci_build/github/android/build_aar_package.py --build_dir ${{ runner.temp }} --config Release --android_sdk_path $ANDROID_SDK_ROOT --android_ndk_path $ANDROID_NDK_ROOT ${{ runner.temp }}/.build_settings/build_settings.json # Copy the built artifacts to give folder for publishing - BASE_PATH=${{ runner.temp }}/aar_out/Release/com/microsoft/onnxruntime/onnxruntime-android/${ORT_VERSION} + BASE_PATH=${{ runner.temp }}/aar_out/Release/com/microsoft/onnxruntime/onnxruntime-android/${OnnxRuntimeVersion} cp ${BASE_PATH}/*.jar ${{ runner.temp }}/artifacts cp ${BASE_PATH}/*.aar ${{ runner.temp }}/artifacts cp ${BASE_PATH}/*.pom ${{ runner.temp }}/artifacts From f3194b184fda4ca547b379ef8140bc968cf84291 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Tue, 16 Sep 2025 23:35:54 -0700 Subject: [PATCH 14/27] update --- .github/workflows/react_native.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 6de17bf6f1b33..23f8ead367436 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -141,18 +141,6 @@ jobs: with: ndk-version: 28.0.13004108 - - name: Start Android Emulator - run: | - if test -f ./emulator.pid; then - echo "Emulator PID file was not expected to exist but does and has pid: $(cat ./emulator.pid)" - exit 1 - fi - python3 tools/python/run_android_emulator.py \ - --android-sdk-root "${ANDROID_SDK_ROOT}" \ - --start --emulator-extra-args="-partition-size 2047" \ - --emulator-pid-file ./emulator.pid - echo "Emulator PID: $(cat ./emulator.pid)" - - name: Run React Native Android Instrumented Tests run: ./gradlew connectedDebugAndroidTest --stacktrace working-directory: ${{ github.workspace }}/js/react_native/android From 2630b5ecca7cfcaed31c9d53ae89ff9c3481fd9f Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 08:47:30 -0700 Subject: [PATCH 15/27] stash --- .github/workflows/react_native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 23f8ead367436..c5de3b9ddcdec 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -75,7 +75,7 @@ jobs: timeout-minutes: 90 steps: - name: Set ANDROID_AVD_HOME environment variable - run: echo "ANDROID_AVD_HOME=${{ runner.temp }}" >> $GITHUB_ENV + run: echo "ANDROID_AVD_HOME=${{ runner.temp }}/android-avd" >> $GITHUB_ENV - name: Checkout repository uses: actions/checkout@v5 From 80c56a8ab49f61041b1f44c9c9d3bce4abaf5151 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 08:58:20 -0700 Subject: [PATCH 16/27] update --- .github/workflows/react_native.yml | 2 +- .../js/react_native_e2e_full_ios_framework_build_settings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index c5de3b9ddcdec..3b5be6d83b118 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -203,7 +203,7 @@ jobs: python ${{ github.workspace }}/tools/ci_build/github/apple/build_and_assemble_apple_pods.py \ --build-dir "${{ runner.temp }}/ios_framework_full" \ --staging-dir "${{ runner.temp }}/ios_pod" \ - --build-settings-file ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json + --build-settings-file ${{ github.workspace }}/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json - name: Upload iOS Pod Artifact uses: actions/upload-artifact@v4 diff --git a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json index b0b19e99dd1a8..19cde9375ca86 100644 --- a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json +++ b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json @@ -1,7 +1,7 @@ { "build_osx_archs": { "iphonesimulator": [ - "x86_64" + "arm64" ] }, "build_params": { From d15a6b788802ff9c126a16b9bdf6ff2d990c810b Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 09:21:26 -0700 Subject: [PATCH 17/27] update --- ...ll_ios_framework_build_settings_arm64.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json diff --git a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json new file mode 100644 index 0000000000000..b0b19e99dd1a8 --- /dev/null +++ b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json @@ -0,0 +1,21 @@ +{ + "build_osx_archs": { + "iphonesimulator": [ + "x86_64" + ] + }, + "build_params": { + "base": [ + "--parallel", + "--use_xcode", + "--build_apple_framework", + "--use_coreml", + "--skip_tests", + "--cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF" + ], + "iphonesimulator": [ + "--ios", + "--apple_deploy_target=15.1" + ] + } +} From ab4253f142fae7138a0a382dde7d456106714f21 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 15:41:17 -0700 Subject: [PATCH 18/27] correct settings --- .../js/react_native_e2e_full_ios_framework_build_settings.json | 2 +- ...eact_native_e2e_full_ios_framework_build_settings_arm64.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json index 19cde9375ca86..b0b19e99dd1a8 100644 --- a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json +++ b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings.json @@ -1,7 +1,7 @@ { "build_osx_archs": { "iphonesimulator": [ - "arm64" + "x86_64" ] }, "build_params": { diff --git a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json index b0b19e99dd1a8..19cde9375ca86 100644 --- a/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json +++ b/tools/ci_build/github/js/react_native_e2e_full_ios_framework_build_settings_arm64.json @@ -1,7 +1,7 @@ { "build_osx_archs": { "iphonesimulator": [ - "x86_64" + "arm64" ] }, "build_params": { From e18a02ace5f6c9ed528f0052f0c9ed6d6f679382 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 15:52:13 -0700 Subject: [PATCH 19/27] update version --- .github/workflows/react_native.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 3b5be6d83b118..6fcc50c93fc66 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -36,7 +36,7 @@ jobs: with: ndk-version: 28.0.13004108 - - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.9 with: vcpkg-version: '2025.06.13' vcpkg-hash: '735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc' @@ -189,7 +189,7 @@ jobs: - name: Install Python requirements run: pip install -r tools/ci_build/github/apple/ios_packaging/requirements.txt - - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.9 with: vcpkg-version: '2025.06.13' vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc @@ -234,7 +234,7 @@ jobs: with: node-version: '22.x' - - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.9 with: vcpkg-version: '2025.06.13' vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc @@ -292,7 +292,7 @@ jobs: with: node-version: '22.x' - - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.8 + - uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.9 with: vcpkg-version: '2025.06.13' vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc @@ -330,4 +330,4 @@ jobs: --configuration ios.sim.release \ --loglevel verbose \ --take-screenshots failing - working-directory: ${{ github.workspace }}/js/react_native/e2e \ No newline at end of file + working-directory: ${{ github.workspace }}/js/react_native/e2e From aa14f58d8e2ecfd533a872039670e6566212b587 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 22:03:14 -0700 Subject: [PATCH 20/27] tests --- js/react_native/e2e/.detoxrc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/react_native/e2e/.detoxrc.js b/js/react_native/e2e/.detoxrc.js index 1d49f06213e51..00eaaf8b19211 100644 --- a/js/react_native/e2e/.detoxrc.js +++ b/js/react_native/e2e/.detoxrc.js @@ -14,13 +14,13 @@ module.exports = { type: 'ios.app', binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/OnnxruntimeModuleExample.app', build: - 'xcodebuild ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build', + 'xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build', }, 'ios.release': { type: 'ios.app', binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/OnnxruntimeModuleExample.app', build: - 'xcodebuild ARCHS=x86_64 ONLY_ACTIVE_ARCH=NO -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', + 'xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', }, 'android.debug': { type: 'android.apk', @@ -39,7 +39,7 @@ module.exports = { type: 'ios.simulator', device: { type: 'iPhone 15', - os: 'iOS 17.4', + os: 'iOS 17.5', }, }, attached: { From 729096df6e2280d3438b076bc00b0980fcbdf673 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Wed, 17 Sep 2025 22:08:07 -0700 Subject: [PATCH 21/27] update --- .github/workflows/react_native.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index 6fcc50c93fc66..d13246bdf3fef 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -257,7 +257,9 @@ jobs: - name: Pod install run: | - ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install + set -e -x + ls ${{ runner.temp }}/ios_pod/onnxruntime-c + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install --verbose working-directory: ${{ github.workspace }}/js/react_native/ios - name: Run React Native iOS Instrumented Tests @@ -319,7 +321,9 @@ jobs: - name: Pod install for e2e tests run: | - ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install + set -e -x + ls ${{ runner.temp }}/ios_pod/onnxruntime-c + ORT_C_LOCAL_POD_PATH=${{ runner.temp }}/ios_pod/onnxruntime-c pod install --verbose working-directory: ${{ github.workspace }}/js/react_native/e2e/ios - name: Build and Run Detox iOS e2e Tests From 3d54475f89e6243ad4d6a691409f9e5a6b28fc7e Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Sep 2025 12:57:34 -0700 Subject: [PATCH 22/27] revert --- js/react_native/e2e/.detoxrc.js | 6 +- .../templates/react-native-ci.yml | 81 ------------------- 2 files changed, 3 insertions(+), 84 deletions(-) diff --git a/js/react_native/e2e/.detoxrc.js b/js/react_native/e2e/.detoxrc.js index 00eaaf8b19211..873efcf0bf402 100644 --- a/js/react_native/e2e/.detoxrc.js +++ b/js/react_native/e2e/.detoxrc.js @@ -14,13 +14,13 @@ module.exports = { type: 'ios.app', binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/OnnxruntimeModuleExample.app', build: - 'xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build', + 'xcodebuild ARCHS=arm64 ONLY_ACTIVE_ARCH=NO -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build', }, 'ios.release': { type: 'ios.app', binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/OnnxruntimeModuleExample.app', build: - 'xcodebuild ONLY_ACTIVE_ARCH=YES -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', + 'xcodebuild ARCHS=arm64 ONLY_ACTIVE_ARCH=NO -workspace ios/OnnxruntimeModuleExample.xcworkspace -scheme OnnxruntimeModuleExample -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', }, 'android.debug': { type: 'android.apk', @@ -39,7 +39,7 @@ module.exports = { type: 'ios.simulator', device: { type: 'iPhone 15', - os: 'iOS 17.5', + os: 'iOS 17.4', }, }, attached: { diff --git a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml index 8fba54783b223..f20172e1c70a6 100644 --- a/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml +++ b/tools/ci_build/github/azure-pipelines/templates/react-native-ci.yml @@ -173,84 +173,3 @@ stages: displayName: Publish React Native iOS Instrumented Test Results - template: explicitly-defined-final-tasks.yml - - - job: ReactNative_CI_iOS_e2e_tests - dependsOn: 'ReactNative_CI_iOS_build' - - ${{ if eq(parameters.is1ES, false) }}: - pool: - vmImage: 'macOS-14' - ${{ if eq(parameters.is1ES, true) }}: - pool: - name: 'Azure Pipelines' - image: 'macOS-14' - os: 'macOS' - - timeoutInMinutes: 90 - - steps: - - template: flex-downloadPipelineArtifact.yml - parameters: - StepName: 'Download Pipeline Artifact - ios_pod' - ArtifactName: 'ios_pod' - TargetPath: '$(Build.BinariesDirectory)/ios_pod' - - - template: use-xcode-version.yml - - - task: NodeTool@0 - inputs: - versionSpec: '22.x' - - - template: ../stages/jobs/steps/react-native-bootstrap-steps.yml - - - script: | - ORT_C_LOCAL_POD_PATH=$(Build.BinariesDirectory)/ios_pod/onnxruntime-c \ - pod install - workingDirectory: '$(Build.SourcesDirectory)/js/react_native/ios' - displayName: Pod install for onnxruntime react native ios bridge library - - # Run E2E tests with Detox on iOS simulator - - script: - brew tap wix/brew - displayName: brew tap wix/brew - - - script: - brew install applesimutils - displayName: Install applesimutils tools required by detox ios - - - script: | - ORT_C_LOCAL_POD_PATH=$(Build.BinariesDirectory)/ios_pod/onnxruntime-c \ - pod install - workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e/ios' - displayName: Pod install for onnxruntime react native ios e2e tests - - - script: | - detox build --configuration ios.sim.release - workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e' - displayName: Build React Native Detox iOS e2e Tests - - - script: | - JEST_JUNIT_OUTPUT_FILE=$(Build.SourcesDirectory)/js/react_native/e2e/ios-test-results.xml \ - detox test --record-logs all \ - --configuration ios.sim.release \ - --loglevel verbose \ - --take-screenshots failing - workingDirectory: '$(Build.SourcesDirectory)/js/react_native/e2e' - displayName: Run React Native Detox iOS e2e Tests - - - task: PublishTestResults@2 - inputs: - testResultsFiles: '$(Build.SourcesDirectory)/js/react_native/e2e/ios-test-results.xml' - failTaskOnFailedTests: true - testRunTitle: 'React Native Detox iOS e2e Test Results' - condition: succeededOrFailed() - displayName: Publish React Native Detox iOS e2e Test Results - - - task: ${{ variables.publishPipelineArtifactTask }} - inputs: - artifactName: 'ios_e2e_test_logs_$(Build.BuildId)_$(Build.BuildNumber)_$(System.JobAttempt)' - targetPath: '$(Build.SourcesDirectory)/js/react_native/e2e/artifacts' - condition: succeededOrFailed() - displayName: Publish React Native Detox E2E test logs - - - template: explicitly-defined-final-tasks.yml From d2b2d19bec11a9a210eaea50c943c3d986888a27 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Sep 2025 13:50:06 -0700 Subject: [PATCH 23/27] update --- .../e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj b/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj index e3a5a1447a68e..6f957af603385 100644 --- a/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj +++ b/js/react_native/e2e/ios/OnnxruntimeModuleExample.xcodeproj/project.pbxproj @@ -666,6 +666,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = ""; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -693,6 +694,7 @@ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; + CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; From 76a35e64ef684e85656eb249409f21186fa59ff0 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Sep 2025 15:16:34 -0700 Subject: [PATCH 24/27] update --- .../ios/OnnxruntimeModule.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj index 079033b9194eb..d7e056f76b1cb 100644 --- a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj +++ b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj @@ -617,7 +617,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_STYLE = Automatic; DEBUG_INFORMATION_FORMAT = dwarf; - DEVELOPMENT_TEAM = X7YWPPMK53; + DEVELOPMENT_TEAM = ""; EXCLUDED_ARCHS = ""; GCC_C_LANGUAGE_STANDARD = gnu11; HEADER_SEARCH_PATHS = ( @@ -695,7 +695,7 @@ CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = X7YWPPMK53; + DEVELOPMENT_TEAM = ""; EXCLUDED_ARCHS = ""; GCC_C_LANGUAGE_STANDARD = gnu11; HEADER_SEARCH_PATHS = ( From c647c185874d31d61ed54f53bd8e5e9dbf94c77d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Sep 2025 15:55:22 -0700 Subject: [PATCH 25/27] update --- .github/workflows/react_native.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index d13246bdf3fef..e4b3a365abc49 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -264,7 +264,7 @@ jobs: - name: Run React Native iOS Instrumented Tests run: | - xcodebuild test \ + xcodebuild ARCHS=arm64 ONLY_ACTIVE_ARCH=NO test \ -workspace OnnxruntimeModule.xcworkspace \ -scheme OnnxruntimeModuleTest \ -sdk iphonesimulator \ From 1ee667bc70f220737eb186f7cf54cee920ad7dd1 Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Thu, 18 Sep 2025 21:42:11 -0700 Subject: [PATCH 26/27] update --- js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj index d7e056f76b1cb..600e8f07fc98a 100644 --- a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj +++ b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj @@ -230,8 +230,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - E329E1182D372C780016B599 /* PrivacyInfo.xcprivacy in Resources */, DBDB588B2609B18F004F16BE /* Resources in Resources */, + E329E1182D372C780016B599 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From f081857eadc6bbe0b3f500207f464972fc0d4e6d Mon Sep 17 00:00:00 2001 From: Changming Sun Date: Fri, 19 Sep 2025 10:11:04 -0700 Subject: [PATCH 27/27] update --- .github/workflows/react_native.yml | 6 +----- .../ios/OnnxruntimeModule.xcodeproj/project.pbxproj | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/react_native.yml b/.github/workflows/react_native.yml index e4b3a365abc49..9327bd0ecfe3c 100644 --- a/.github/workflows/react_native.yml +++ b/.github/workflows/react_native.yml @@ -264,11 +264,7 @@ jobs: - name: Run React Native iOS Instrumented Tests run: | - xcodebuild ARCHS=arm64 ONLY_ACTIVE_ARCH=NO test \ - -workspace OnnxruntimeModule.xcworkspace \ - -scheme OnnxruntimeModuleTest \ - -sdk iphonesimulator \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' + /usr/bin/xcodebuild -sdk iphonesimulator -configuration Debug -workspace ${{ github.workspace }}/js/react_native/ios/OnnxruntimeModule.xcworkspace -scheme OnnxruntimeModuleTest -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' test CODE_SIGNING_ALLOWED=NO working-directory: ${{ github.workspace }}/js/react_native/ios react_native_ci_ios_e2e_tests: diff --git a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj index 600e8f07fc98a..60142e842f8a2 100644 --- a/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj +++ b/js/react_native/ios/OnnxruntimeModule.xcodeproj/project.pbxproj @@ -201,7 +201,7 @@ }; DBDB57D62603211A004F16BE = { CreatedOnToolsVersion = 12.4; - DevelopmentTeam = X7YWPPMK53; + DevelopmentTeam = ""; ProvisioningStyle = Automatic; }; };