Skip to content

Change Github Action's triggers #24222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
9 changes: 6 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ on:
workflow_dispatch:

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

jobs:
android_nnapi_ep:
Expand Down Expand Up @@ -61,7 +62,9 @@ jobs:


- name: Build Minimal ORT with NNAPI and run tests
run: tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh "$(pwd)"
run:
tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh
"$(pwd)"
shell: bash

- name: Install psutil for emulator shutdown by run_android_emulator.py
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ name: "CodeQL"

on:
push:
branches: [ "main", nuget_pkg, rel-* ]
branches: ["main", nuget_pkg, rel-*]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '41 13 * * 0'

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

jobs:
Expand All @@ -31,44 +32,43 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'java', 'javascript', 'python' ]
language: ['java', 'javascript', 'python']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

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

# 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
queries: security-extended,security-and-quality
queries: security-extended,security-and-quality

# Setup Java to use a version that is not too old for the project
- if: ${{ matrix.language == 'java' }}
name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'microsoft'
- if: ${{ matrix.language == 'java' }}
name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'microsoft'

- if: ${{ matrix.language == 'javascript' }}
uses: actions/setup-node@v4
with:
node-version: 20
- if: ${{ matrix.language == 'javascript' }}
uses: actions/setup-node@v4
with:
node-version: 20

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
79 changes: 41 additions & 38 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,56 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
|| github.sha }}
cancel-in-progress: true

jobs:
iOS_CI_on_Mac:
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Use Xcode ${{ env.XCODE_VERSION }}
shell: bash
run: |
set -e -x
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Use Xcode ${{ env.XCODE_VERSION }}
shell: bash
run: |
set -e -x
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.XCODE_VERSION }}.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"

- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: (CPU, CoreML, XNNPACK EPs) Build onnxruntime for iOS x86_64 and run tests using simulator
shell: bash
run: |
python3 ${{ github.workspace }}/tools/ci_build/build.py \
--skip_submodule_sync \
--build_dir ${{ github.workspace }}/iOS \
--build_shared_lib \
--use_coreml \
--use_xnnpack \
--ios \
--apple_sysroot iphonesimulator \
--osx_arch x86_64 \
--apple_deploy_target=15.1 \
--use_xcode \
--config RelWithDebInfo \
--build_apple_framework \
--parallel \
--use_binskim_compliant_compile_flags
env:
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: ${{ env.IOS_SIMULATOR_RUNTIME_VERSION }}
- name: (CPU, CoreML, XNNPACK EPs) Build onnxruntime for iOS x86_64 and run
tests using simulator
shell: bash
run: |
python3 ${{ github.workspace }}/tools/ci_build/build.py \
--skip_submodule_sync \
--build_dir ${{ github.workspace }}/iOS \
--build_shared_lib \
--use_coreml \
--use_xnnpack \
--ios \
--apple_sysroot iphonesimulator \
--osx_arch x86_64 \
--apple_deploy_target=15.1 \
--use_xcode \
--config RelWithDebInfo \
--build_apple_framework \
--parallel \
--use_binskim_compliant_compile_flags
env:
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: ${{ env.IOS_SIMULATOR_RUNTIME_VERSION
}}

timeout-minutes: 150
env:
XCODE_VERSION: 14.3.1
IOS_SIMULATOR_RUNTIME_VERSION: 16.4
IOS_SIMULATOR_RUNTIME_VERSION: 16.4
17 changes: 6 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'workflow_dispatch' }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
|| github.sha }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -108,17 +109,11 @@ jobs:
github_token: ${{ secrets.github_token }}
reporter: github-pr-check
level: info
flags: --linelength=120
--exclude=java/src/main/native/*.c
--exclude=onnxruntime/core/mlas/inc/*
--exclude=onnxruntime/core/mlas/lib/*
--exclude=onnxruntime/contrib_ops/cuda/bert/flash_attention/*
--exclude=build/Debug/*
--exclude=cmake/*
--exclude=csharp/test/*
flags: --linelength=120 --exclude=java/src/main/native/*.c --exclude=onnxruntime/core/mlas/inc/*
--exclude=onnxruntime/core/mlas/lib/* --exclude=onnxruntime/contrib_ops/cuda/bert/flash_attention/*
--exclude=build/Debug/* --exclude=cmake/* --exclude=csharp/test/*
--exclude=onnxruntime/core/providers/dml/DmlExecutionProvider/src/Operators/GeneratedShaders/*
--exclude=orttraining/orttraining/test/*
--exclude=onnxruntime/test/*
--exclude=orttraining/orttraining/test/* --exclude=onnxruntime/test/*
--exclude=winml/*
filter: "-runtime/references"

Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/linux-dnnl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ name: Linux CI

on:
push:
branches: [ main, 'rel-*']
branches: [main, 'rel-*']
pull_request:
branches: [ main, 'rel-*']
branches: [main, 'rel-*']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
|| github.sha }}
cancel-in-progress: true

jobs:
Expand All @@ -26,7 +27,8 @@ jobs:
architecture: x64
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
docker_image_repo: onnxruntimecpubuildpythonx64
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget --use_dnnl'
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget
--use_dnnl'
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:\$PATH'
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 11 additions & 6 deletions .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ name: Linux CI

on:
push:
branches: [ main, 'rel-*']
branches: [main, 'rel-*']
pull_request:
branches: [ main, 'rel-*']
branches: [main, 'rel-*']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref
|| github.sha }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -54,7 +55,8 @@ jobs:
architecture: x64
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
docker_image_repo: onnxruntimecpubuildpythonx64
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget --enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget
--enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:\$PATH' # $ needs escaping in single quotes
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -68,7 +70,9 @@ jobs:
architecture: x64
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
docker_image_repo: onnxruntimecpubuildpythonx64 # Shares image with standard x64 release
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'
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'
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:\$PATH' # $ needs escaping in single quotes
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -97,7 +101,8 @@ jobs:
architecture: arm64
dockerfile_path: tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/Dockerfile
docker_image_repo: onnxruntimecpubuildpythonaarch64
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --cmake_extra_defines
onnxruntime_BUILD_BENCHMARKS=ON'
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:\$PATH' # $ needs escaping in single quotes
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:
workflow_dispatch:

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

env:
Expand Down
Loading
Loading