Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 34e87e8

Browse files
committedApr 23, 2025·
update
1 parent abb769b commit 34e87e8

35 files changed

+1102
-1020
lines changed
 

‎.github/actions/locate-vcvarsall-and-setup-env/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ runs:
1414
steps:
1515

1616
- name: Setup VCPKG
17-
uses: microsoft/onnxruntime-github-actions/setup-build-tools@fe5db81d63e8df49f321f3c1b07d793fd21325a1
17+
uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.6
1818
with:
1919
vcpkg-version: '2025.03.19'
2020
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'

‎.github/workflows/android.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ on:
1313
workflow_dispatch:
1414

1515
concurrency:
16-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
17-
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
16+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
17+
|| github.sha }}
18+
cancel-in-progress: true
1819

1920
jobs:
2021
android_nnapi_ep:
@@ -30,7 +31,7 @@ jobs:
3031
architecture: x64
3132

3233

33-
- uses: microsoft/onnxruntime-github-actions/setup-build-tools@fe5db81d63e8df49f321f3c1b07d793fd21325a1
34+
- uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.6
3435
with:
3536
vcpkg-version: '2025.03.19'
3637
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'
@@ -71,7 +72,9 @@ jobs:
7172

7273

7374
- name: Build Minimal ORT with NNAPI and run tests
74-
run: tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh "$(pwd)"
75+
run:
76+
tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh
77+
"$(pwd)"
7578
shell: bash
7679

7780
- name: Install psutil for emulator shutdown by run_android_emulator.py

‎.github/workflows/codeql.yml

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ name: "CodeQL"
88

99
on:
1010
push:
11-
branches: [ "main", nuget_pkg, rel-* ]
11+
branches: ["main", nuget_pkg, rel-*]
1212
pull_request:
1313
# The branches below must be a subset of the branches above
14-
branches: [ "main" ]
14+
branches: ["main"]
1515
schedule:
1616
- cron: '41 13 * * 0'
1717
workflow_dispatch:
1818

1919
concurrency:
20-
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
20+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
21+
|| github.sha }}
2122
cancel-in-progress: true
2223

2324
jobs:
@@ -32,44 +33,44 @@ jobs:
3233
strategy:
3334
fail-fast: false
3435
matrix:
35-
language: [ 'java', 'javascript', 'python' ]
36+
language: ['java', 'javascript', 'python']
3637
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
3738
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3839

3940
steps:
40-
- name: Checkout repository
41-
uses: actions/checkout@v4
41+
- name: Checkout repository
42+
uses: actions/checkout@v4
4243

4344
# Initializes the CodeQL tools for scanning.
44-
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v3
46-
with:
47-
languages: ${{ matrix.language }}
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v3
47+
with:
48+
languages: ${{ matrix.language }}
4849
# If you wish to specify custom queries, you can do so here or in a config file.
4950
# By default, queries listed here will override any specified in a config file.
5051
# Prefix the list here with "+" to use these queries and those in the config file.
5152

5253
# Details on CodeQL's query packs refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53-
queries: security-extended,security-and-quality
54+
queries: security-extended,security-and-quality
5455

5556
# Setup Java to use a version that is not too old for the project
56-
- if: ${{ matrix.language == 'java' }}
57-
name: Setup Java 11
58-
uses: actions/setup-java@v4
59-
with:
60-
java-version: '11'
61-
distribution: 'microsoft'
57+
- if: ${{ matrix.language == 'java' }}
58+
name: Setup Java 11
59+
uses: actions/setup-java@v4
60+
with:
61+
java-version: '11'
62+
distribution: 'microsoft'
6263

63-
- if: ${{ matrix.language == 'javascript' }}
64-
uses: actions/setup-node@v4
65-
with:
66-
node-version: 20
64+
- if: ${{ matrix.language == 'javascript' }}
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 20
6768

6869
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6970
# If this step fails, then you should remove it and run the build manually (see below)
70-
- if: ${{ matrix.language != 'cpp' }}
71-
name: Autobuild
72-
uses: github/codeql-action/autobuild@v3
71+
- if: ${{ matrix.language != 'cpp' }}
72+
name: Autobuild
73+
uses: github/codeql-action/autobuild@v3
7374

74-
- name: Perform CodeQL Analysis
75-
uses: github/codeql-action/analyze@v3
75+
- name: Perform CodeQL Analysis
76+
uses: github/codeql-action/analyze@v3

‎.github/workflows/ios.yml

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,53 +12,56 @@ on:
1212
workflow_dispatch:
1313

1414
concurrency:
15-
group: ${{ github.workflow }}-${{ github.ref }}
15+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
16+
|| github.sha }}
1617
cancel-in-progress: true
1718

1819
jobs:
1920
iOS_CI_on_Mac:
2021
runs-on: macos-14
2122
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v4
24-
with:
25-
submodules: false
26-
- name: Use Xcode ${{ env.XCODE_VERSION }}
27-
shell: bash
28-
run: |
29-
set -e -x
30-
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer"
31-
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
with:
26+
submodules: false
27+
- name: Use Xcode ${{ env.XCODE_VERSION }}
28+
shell: bash
29+
run: |
30+
set -e -x
31+
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer"
32+
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
3233
33-
- name: Export GitHub Actions cache environment variables
34-
uses: actions/github-script@v7
35-
with:
36-
script: |
37-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
38-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
34+
- name: Export GitHub Actions cache environment variables
35+
uses: actions/github-script@v7
36+
with:
37+
script: |
38+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
39+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
3940
40-
- name: (CPU, CoreML, XNNPACK EPs) Build onnxruntime for iOS x86_64 and run tests using simulator
41-
shell: bash
42-
run: |
43-
python3 ${{ github.workspace }}/tools/ci_build/build.py \
44-
--skip_submodule_sync \
45-
--build_dir ${{ github.workspace }}/iOS \
46-
--build_shared_lib \
47-
--use_coreml \
48-
--use_xnnpack \
49-
--ios \
50-
--apple_sysroot iphonesimulator \
51-
--osx_arch x86_64 \
52-
--apple_deploy_target=15.1 \
53-
--use_xcode \
54-
--config RelWithDebInfo \
55-
--build_apple_framework \
56-
--parallel \
57-
--use_binskim_compliant_compile_flags
58-
env:
59-
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: ${{ env.IOS_SIMULATOR_RUNTIME_VERSION }}
41+
- name: (CPU, CoreML, XNNPACK EPs) Build onnxruntime for iOS x86_64 and run
42+
tests using simulator
43+
shell: bash
44+
run: |
45+
python3 ${{ github.workspace }}/tools/ci_build/build.py \
46+
--skip_submodule_sync \
47+
--build_dir ${{ github.workspace }}/iOS \
48+
--build_shared_lib \
49+
--use_coreml \
50+
--use_xnnpack \
51+
--ios \
52+
--apple_sysroot iphonesimulator \
53+
--osx_arch x86_64 \
54+
--apple_deploy_target=15.1 \
55+
--use_xcode \
56+
--config RelWithDebInfo \
57+
--build_apple_framework \
58+
--parallel \
59+
--use_binskim_compliant_compile_flags
60+
env:
61+
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: ${{ env.IOS_SIMULATOR_RUNTIME_VERSION
62+
}}
6063

6164
timeout-minutes: 150
6265
env:
6366
XCODE_VERSION: 15.3.0
64-
IOS_SIMULATOR_RUNTIME_VERSION: 17.4
67+
IOS_SIMULATOR_RUNTIME_VERSION: 17.4

‎.github/workflows/lint.yml

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ on:
55
branches:
66
- main
77
- rel-*
8-
- snnn/ci
98
pull_request:
109
workflow_dispatch:
1110

1211
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
12+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
13+
|| github.sha }}
1414
cancel-in-progress: true
1515

1616
jobs:
@@ -85,21 +85,25 @@ jobs:
8585
checkout_path: ${{ github.workspace }}
8686

8787
lint-cpp:
88-
runs-on:
89-
- self-hosted
90-
- "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"
91-
steps:
92-
- name: Checkout code
93-
uses: actions/checkout@v4
94-
with:
95-
submodules: 'false'
88+
runs-on:
89+
- self-hosted
90+
- "1ES.Pool=onnxruntime-github-Ubuntu2204-AMD-CPU"
91+
steps:
92+
- name: Checkout code
93+
uses: actions/checkout@v4
94+
with:
95+
submodules: 'false'
9696

97-
- name: Check format
98-
uses: microsoft/onnxruntime-github-actions/format-lint-check@fe5db81d63e8df49f321f3c1b07d793fd21325a1
99-
with:
100-
llvm-version: '20.1.0'
101-
llvm-sha256-hash: '954ac51498519f6ed9540714fb04bc401f70039b296a8160dd1559be380788d7'
102-
ignore-patterns: "java/**\nonnxruntime/core/mlas/inc/*\nonnxruntime/core/mlas/lib/*\nonnxruntime/contrib_ops/cuda/bert/tensorrt_fused_multihead_attention/**\nonnxruntime/contrib_ops/cuda/bert/flash_attention/**\ncsharp/test/**\nonnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/GeneratedShaders/*\norttraining/orttraining/test/**\nonnxruntime/test/**\nwinml/**"
97+
- name: Check format
98+
uses: microsoft/onnxruntime-github-actions/format-lint-check@v0.0.6
99+
with:
100+
llvm-version: '20.1.0'
101+
llvm-sha256-hash: '954ac51498519f6ed9540714fb04bc401f70039b296a8160dd1559be380788d7'
102+
ignore-patterns: "java/**\nonnxruntime/core/mlas/inc/*\nonnxruntime/core/mlas/lib/*\n\
103+
onnxruntime/contrib_ops/cuda/bert/tensorrt_fused_multihead_attention/**\n\
104+
onnxruntime/contrib_ops/cuda/bert/flash_attention/**\ncsharp/test/**\n\
105+
onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/GeneratedShaders/*\n\
106+
orttraining/orttraining/test/**\nonnxruntime/test/**\nwinml/**"
103107

104108
lint-js:
105109
name: Lint JavaScript

‎.github/workflows/linux-dnnl.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ name: Linux DNNL CI
88

99
on:
1010
push:
11-
branches: [ main, 'rel-*']
11+
branches: [main, 'rel-*']
1212
pull_request:
13-
branches: [ main, 'rel-*']
13+
branches: [main, 'rel-*']
1414
workflow_dispatch:
1515

1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
17+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
18+
|| github.sha }}
1819
cancel-in-progress: true
1920

2021
permissions:
@@ -33,7 +34,8 @@ jobs:
3334
architecture: x64
3435
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
3536
docker_image_repo: onnxruntimecpubuildpythonx64
36-
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget --use_dnnl'
37+
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget
38+
--use_dnnl'
3739
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH'
3840
secrets:
3941
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎.github/workflows/linux-wasm-ci-build-and-test-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
python-version: "3.12"
4444
architecture: ${{ env.buildArch }}
45-
- uses: microsoft/onnxruntime-github-actions/setup-build-tools@fe5db81d63e8df49f321f3c1b07d793fd21325a1
45+
- uses: microsoft/onnxruntime-github-actions/setup-build-tools@v0.0.6
4646
with:
4747
vcpkg-version: '2025.03.19'
4848
vcpkg-hash: '17e96169cd3f266c4716fcdc1bb728e6a64f103941ece463a2834d50694eba4fb48f30135503fd466402afa139abc847ef630733c442595d1c34979f261b0114'

‎.github/workflows/linux_ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ name: Linux CI
2121

2222
on:
2323
push:
24-
branches: [ main, 'rel-*', 'snnn/ci']
24+
branches: [main, 'rel-*']
2525
pull_request:
26-
branches: [ main, 'rel-*']
26+
branches: [main, 'rel-*']
2727
workflow_dispatch:
2828

2929
concurrency:
30-
group: ${{ github.workflow }}-${{ github.ref }}
30+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
31+
|| github.sha }}
3132
cancel-in-progress: true
3233

3334
permissions:
@@ -61,7 +62,8 @@ jobs:
6162
architecture: x64
6263
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
6364
docker_image_repo: onnxruntimecpubuildpythonx64
64-
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget --enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
65+
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget
66+
--enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
6567
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' # $ needs escaping in single quotes
6668
secrets:
6769
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -75,7 +77,9 @@ jobs:
7577
architecture: x64
7678
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
7779
docker_image_repo: onnxruntimecpubuildpythonx64 # Shares image with standard x64 release
78-
extra_build_flags: '--enable_training --use_binskim_compliant_compile_flags --build_wheel --build_nuget --enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
80+
extra_build_flags: '--enable_training --use_binskim_compliant_compile_flags
81+
--build_wheel --build_nuget --enable_transformers_tool_test --cmake_extra_defines
82+
onnxruntime_BUILD_BENCHMARKS=ON'
7983
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' # $ needs escaping in single quotes
8084
secrets:
8185
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -104,7 +108,8 @@ jobs:
104108
architecture: arm64
105109
dockerfile_path: tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/Dockerfile
106110
docker_image_repo: onnxruntimecpubuildpythonaarch64
107-
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
111+
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --cmake_extra_defines
112+
onnxruntime_BUILD_BENCHMARKS=ON'
108113
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' # $ needs escaping in single quotes
109114
secrets:
110115
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)
Please sign in to comment.