Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into Cjian/linux_c++20
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed May 24, 2024
2 parents 2e795b4 + 884acd4 commit 1a7efec
Show file tree
Hide file tree
Showing 2,975 changed files with 251,375 additions and 77,948 deletions.
22 changes: 0 additions & 22 deletions .github/stale.yml

This file was deleted.

14 changes: 11 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
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.
Expand All @@ -47,11 +47,19 @@ jobs:
# 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

# 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'

# 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@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
36 changes: 0 additions & 36 deletions .github/workflows/generated_fake_win_gpu_ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/gradle-wrapper-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v1
- uses: gradle/wrapper-validation-action@v3
5 changes: 4 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ on:
issues:
types: [opened, edited]

permissions:
issues: write

jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.2
- uses: github/issue-labeler@v3.4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Version range or exact version of Python to use, using SemVer's version range syntax. Reads from .python-version if unset.
python-version: "3.10"
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Upload SARIF file
if: always()
continue-on-error: true
uses: github/codeql-action/upload-sarif@v2
uses: github/codeql-action/upload-sarif@v3
with:
# Path to SARIF file relative to the root of the repository
sarif_file: lintrunner.sarif
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8.x'
architecture: 'x64'
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Mac_CI

on:
push:
branches:
- main
- rel-*
pull_request:
branches:
- main
- rel-*
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
python_version: 3.11
xcode_version: 15.2

jobs:
ARM64:
runs-on: macos-14

timeout-minutes: 60

steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Verify ARM64 machine
shell: python
run: |
import platform
assert platform.machine() == "arm64", "This job expects to be run on an ARM64 machine."
- name: Use Xcode ${{ env.xcode_version }}
shell: bash
run: |
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
- uses: actions/checkout@v4

- name: Build and test
shell: bash
run: |
python ./tools/ci_build/build.py \
--build_dir ./build \
--update \
--build --parallel \
--test \
--build_shared_lib \
--build_objc \
--use_xnnpack \
--use_binskim_compliant_compile_flags
# TODO add --use_coreml once unit test failures are addressed
Objective-C-StaticAnalysis:
runs-on: macos-14

timeout-minutes: 30

steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Use Xcode ${{ env.xcode_version }}
shell: bash
run: |
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
- uses: actions/checkout@v4

- name: Generate compile_commands.json and ONNX protobuf files
shell: bash
run: |
python ./tools/ci_build/build.py \
--build_dir ./build \
--cmake_generator "Unix Makefiles" \
--config Debug \
--build_shared_lib \
--use_coreml \
--build_objc \
--enable_training_apis \
--cmake_extra_defines CMAKE_EXPORT_COMPILE_COMMANDS=ON \
--use_binskim_compliant_compile_flags \
--update \
--build --parallel \
--target onnx_proto
- name: Analyze Objective-C/C++ source code
shell: bash
run: |
CLANG_TIDY_CHECKS="-*,clang-analyzer-*"
"$(brew --prefix llvm@15)/bin/clang-tidy" \
-p=./build/Debug \
--checks="${CLANG_TIDY_CHECKS}" \
--warnings-as-errors="${CLANG_TIDY_CHECKS}" \
--header-filter="objectivec/include|objectivec|onnxruntime/core" \
./objectivec/*.mm \
./onnxruntime/core/platform/apple/logging/apple_log_sink.mm \
./onnxruntime/core/providers/coreml/model/*.mm
2 changes: 1 addition & 1 deletion .github/workflows/publish-c-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
rm -rf site/docs/api/c
mv build/doxygen/html _site/docs/api/c
- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-c-apidocs
path: _site
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-csharp-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
Expand All @@ -37,7 +37,7 @@ jobs:
wget https://github.com/dotnet/docfx/releases/download/v${DOCFXVERSION}/docfx-linux-x64-v${DOCFXVERSION}.zip -O build/docfx/docfx.zip
unzip build/docfx/docfx.zip -d build/docfx
- name: Install NuGet
uses: nuget/setup-nuget@v1
uses: nuget/setup-nuget@v2
- name: Build Documentation
run: |
build/docfx/docfx metadata csharp/ApiDocs/docfx.json
Expand All @@ -51,7 +51,7 @@ jobs:
rm -rf _site/docs/api/csharp
mv csharp/ApiDocs/csharp _site/docs/api/csharp
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-csharp-apidocs
path: _site
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-java-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
build-root-directory: java
gradle-executable: java/gradlew
Expand All @@ -43,7 +43,7 @@ jobs:
mkdir -p _site/docs/api
mv java/build/docs/javadoc _site/docs/api/java
- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-java-apidocs
path: _site
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-js-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Generate JS docs
Expand All @@ -43,7 +43,7 @@ jobs:
mkdir -p _site/docs/api
mv js/common/docs _site/docs/api/js
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-node-apidocs
path: _site
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-objectivec-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
build:
name: Generate Objective-C API docs
runs-on: macos-13
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -44,7 +44,7 @@ jobs:
shell: bash

- name: Upload new site
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-objectivec-apidocs
path: ./_site
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
mkdir -p _site/docs/api/
mv build/docs/html _site/docs/api/python
- name: Upload docs artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: onnxruntime-python-apidocs
path: _site
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Close stale issues
on:
# Allows you to dictate when you want this workflow to run using cron syntax (times in UTC)
schedule:
- cron: "0 15 * * *"
# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

jobs:
close-stale-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
# Comma separated list of labels that can be assigned to issues to exclude them from being marked as stale
exempt-issue-labels: contributions welcome, feature request, regression
# Override exempt-all-assignees but only to exempt the issues with an assignee to be marked as stale automatically
exempt-all-issue-assignees: true
# Used to ignore the issues and pull requests created before the start date
# Start date should be April 19, 2022 - corresponds to the day previous stale bot stopped working
start-date: '2022-04-19T00:00:00Z'
# Number of days without activity before the actions/stale action labels an issue
days-before-issue-stale: 30
# Number of days without activity before the actions/stale action closes an issue
days-before-issue-close: 30
# Label you want to apply to issues that have been inactive for the amount of time specified by days-before-issue-stale
stale-issue-label: "stale"
# Comment that you want to add to issues that are labeled by the actions/stale action
stale-issue-message: "This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details."
# Comment that you want to add to issues that are closed by the actions/stale action
close-issue-message: "This issue has been automatically closed due to inactivity. Please reactivate if further support is needed."
# If you never want this action to label PRs, set this value to -1
days-before-pr-stale: -1
# If you never want this action to close PRs, set this value to -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 1a7efec

Please sign in to comment.