Skip to content
Closed
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
110 changes: 104 additions & 6 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
python_version: 3.11

jobs:
MacOS_C_API_Packaging_CPU_x86_64:
x86_64-Xcode14:
runs-on: macos-13
steps:
- name: Checkout repository
Expand Down Expand Up @@ -88,13 +88,13 @@ jobs:
run: |
set -e -x
rm -rf ${{ github.workspace }}/Release
python3 ${{ github.workspace }}/tools/ci_build/build.py --update --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache
python3 ${{ github.workspace }}/tools/ci_build/build.py --update --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache

- name: Build (build.py --build)
shell: bash
run: |
set -e -x
python3 ${{ github.workspace }}/tools/ci_build/build.py --build --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_vcpkg --use_vcpkg_ms_internal_asset_cache --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache
python3 ${{ github.workspace }}/tools/ci_build/build.py --build --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache

- name: Install
shell: bash
Expand All @@ -107,12 +107,109 @@ jobs:
shell: bash
run: |
set -e -x
python3 ${{ github.workspace }}/tools/ci_build/build.py --test --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache
python3 ${{ github.workspace }}/tools/ci_build/build.py --test --build_objc --build_wheel --use_xnnpack --build_nodejs --build_java --use_coreml --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache
timeout-minutes: 300
env:
MACOSX_DEPLOYMENT_TARGET: '13.3'
ALLOW_RELEASED_ONNX_OPSET_ONLY: '0'
MACOSX_DEPLOYMENT_TARGET: "13.3"
ALLOW_RELEASED_ONNX_OPSET_ONLY: "0"

x86_64-Xcode14_webgpu:
runs-on: macos-13
continue-on-error: true

env:
MACOSX_DEPLOYMENT_TARGET: "13.3"
ALLOW_RELEASED_ONNX_OPSET_ONLY: "0"

timeout-minutes: 300

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

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

- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
architecture: x64

- name: Set version number variables for Unix
shell: bash
run: |
# Do not output ##vso[] commands with `set -x` or they may be parsed again and include a trailing quote.
set +x

_OnnxRuntimeVersion=$(head -1 ${{ github.workspace }}/VERSION_NUMBER)
echo "OnnxRuntimeVersion=$_OnnxRuntimeVersion"

_OnnxRuntimeGitCommitHash=$(git rev-parse HEAD)
echo "OnnxRuntimeGitCommitHash=$_OnnxRuntimeGitCommitHash"

_OnnxRuntimeGitCommitHash=$(git rev-parse --short=8 HEAD)
echo "OnnxRuntimeGitCommitHashShort=$_OnnxRuntimeGitCommitHash"
working-directory: ${{ github.workspace }}

- name: Use Xcode 14.3.1
shell: bash
run: |
set -e -x
XCODE_DEVELOPER_DIR="/Applications/Xcode_14.3.1.app/Contents/Developer"
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"

- name: Setup environment variables
shell: bash
run: |
set -e -x
export PATH=${{ github.workspace }}/installed/bin:$PATH
export ONNX_ML=1
export CMAKE_ARGS="-DONNX_GEN_PB_TYPE_STUBS=ON -DONNX_WERROR=OFF"
python3 -m pip install -r '${{ github.workspace }}/tools/ci_build/github/linux/docker/scripts/requirements.txt'

- 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: Configure Build (build.py --update)
shell: bash
run: |
set -e -x
rm -rf ${{ github.workspace }}/Release
python3 ${{ github.workspace }}/tools/ci_build/build.py --update --build_objc --build_wheel --build_nodejs --build_java --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache

- name: Build (build.py --build)
shell: bash
run: |
set -e -x
python3 ${{ github.workspace }}/tools/ci_build/build.py --build --build_objc --build_wheel --build_nodejs --build_java --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache

- name: Install
shell: bash
run: |
set -e -x
cd ${{ github.workspace }}/Release
make install DESTDIR=${{ github.workspace }}/installed

- name: Running Tests (build.py --test)
shell: bash
run: |
set -e -x
python3 ${{ github.workspace }}/tools/ci_build/build.py --test --build_objc --build_wheel --build_nodejs --build_java --use_webgpu --build_dir ${{ github.workspace }} --skip_submodule_sync --parallel --use_binskim_compliant_compile_flags --build_shared_lib --config Release --use_vcpkg --use_vcpkg_ms_internal_asset_cache
ARM64-Xcode16:
runs-on: macos-15

Expand Down Expand Up @@ -156,6 +253,7 @@ jobs:

ARM64-Xcode16-webgpu:
runs-on: macos-15
continue-on-error: true

env:
xcode_version: 16
Expand Down
Loading