diff --git a/.github/actions/setup-android-ndk/action.yml b/.github/actions/setup-android-ndk/action.yml index f7db1cfc..6ca2903e 100644 --- a/.github/actions/setup-android-ndk/action.yml +++ b/.github/actions/setup-android-ndk/action.yml @@ -18,6 +18,13 @@ runs: shell: bash run: sudo apt-get update -y && sudo apt-get install -y coreutils ninja-build + - name: Enable KVM access + shell: bash + run: | + if [[ -e /dev/kvm ]]; then + sudo chmod 666 /dev/kvm + fi + - name: Install Android NDK shell: bash run: | diff --git a/.github/workflows/extended-pr-validation.yml b/.github/workflows/extended-pr-validation.yml index 2709bb28..4ec280ee 100644 --- a/.github/workflows/extended-pr-validation.yml +++ b/.github/workflows/extended-pr-validation.yml @@ -47,6 +47,7 @@ jobs: shell: bash env: PR_NUMBER: ${{ github.event.pull_request.number }} + PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | set -euo pipefail @@ -57,11 +58,13 @@ jobs: sleep 5 done if [[ -z "$MERGE_COMMIT" ]]; then - echo "GitHub did not create a merge ref for this pull request." >&2 - exit 1 + echo "GitHub did not create a merge ref; validating the pull request head instead." + echo "source_ref=refs/pull/${PR_NUMBER}/head" >> "$GITHUB_OUTPUT" + echo "source_commit=${PR_HEAD_SHA}" >> "$GITHUB_OUTPUT" + else + echo "source_ref=refs/pull/${PR_NUMBER}/merge" >> "$GITHUB_OUTPUT" + echo "source_commit=${MERGE_COMMIT}" >> "$GITHUB_OUTPUT" fi - echo "source_ref=refs/pull/${PR_NUMBER}/merge" >> "$GITHUB_OUTPUT" - echo "source_commit=${MERGE_COMMIT}" >> "$GITHUB_OUTPUT" - name: Select manual revision id: manual_revision diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 251c7f84..3a2ee488 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -18,6 +18,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + with: + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 2926a1cc..e5da9bf8 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -53,7 +53,7 @@ jobs: WhisperLocalAndroid: name: Whisper Local Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 @@ -94,7 +94,7 @@ jobs: WhisperAzureAndroid: name: Whisper Azure Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 @@ -209,7 +209,7 @@ jobs: ObjectDetectionAndroid: name: Object Detection Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 @@ -250,7 +250,7 @@ jobs: ImageClassificationAndroid: name: Image Classification Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 strategy: matrix: ModelFormat: [onnx, ort] @@ -302,7 +302,7 @@ jobs: SuperResolutionAndroid: name: Super Resolution Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 @@ -364,7 +364,7 @@ jobs: QuestionAnsweringAndroid: name: Question Answering Android - runs-on: ["self-hosted", "1ES.Pool=onnxruntime-examples-Ubuntu2204-CPU"] + runs-on: ubuntu-22.04 steps: - name: Checkout repository uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c74d7c3f..6f81db72 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -17,9 +17,20 @@ jobs: # Test against multiple Node.js versions node-version: [20.x, 22.x, 24.x] arch: [x64] + exclude: + - os: macos-latest include: - os: ubuntu-latest arch: arm64 + - os: macos-latest + node-version: 20.x + arch: arm64 + - os: macos-latest + node-version: 22.x + arch: arm64 + - os: macos-latest + node-version: 24.x + arch: arm64 steps: - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.arch }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bc2313d6..a2fb2cbd 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -38,7 +38,8 @@ jobs: &${{ github.workspace }}\ci_build\download_ort_release 1.22.1 - name: Config cmake - run: npm i -g @microsoft/sarif-multitool && mkdir b && cd b && cmake ../c_cxx -DCMAKE_C_FLAGS="/MP /analyze:external- /external:anglebrackets /DWIN32 /D_WINDOWS /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /W4 /Ob0 /Od /RTC1 /analyze:autolog:ext .sarif" -DCMAKE_CXX_FLAGS="/EHsc /MP /analyze:external- /external:anglebrackets /DWIN32 /D_WINDOWS /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /W4 /Ob0 /Od /RTC1 /analyze:autolog:ext .sarif" -A x64 -T host=x64 -DONNXRUNTIME_ROOTDIR=${{ github.workspace }}\onnxruntimebin && cmake --build . --config Debug && npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif --merge-runs + run: | + npm i -g @microsoft/sarif-multitool && mkdir b && cd b && cmake ../c_cxx -DCMAKE_C_FLAGS="/MP /analyze:external- /external:anglebrackets /DWIN32 /D_WINDOWS /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /W4 /Ob0 /Od /RTC1 /analyze:autolog:ext .sarif" -DCMAKE_CXX_FLAGS="/EHsc /MP /analyze:external- /external:anglebrackets /DWIN32 /D_WINDOWS /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /W4 /Ob0 /Od /RTC1 /analyze:autolog:ext .sarif" -A x64 -T host=x64 -DONNXRUNTIME_ROOTDIR=${{ github.workspace }}\onnxruntimebin && cmake --build . --config Debug && npx @microsoft/sarif-multitool merge *.sarif --recurse --output-directory=${{ github.workspace }}\output --output-file=MergeResult.sarif - name: Upload SARIF to GitHub uses: github/codeql-action/upload-sarif@42947a340483f03ba47bb1a039b2c519aab3df85 # v3.37.8 diff --git a/js/quick-start_onnxruntime-node/package.json b/js/quick-start_onnxruntime-node/package.json index 4ff66165..84a48323 100644 --- a/js/quick-start_onnxruntime-node/package.json +++ b/js/quick-start_onnxruntime-node/package.json @@ -6,5 +6,8 @@ "main": "index.js", "dependencies": { "onnxruntime-node": "^1.23.0" + }, + "allowScripts": { + "onnxruntime-node": true } }