|
1 |
| -name: Mac_CI |
| 1 | +name: "MacOS CI Pipeline" |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | push:
|
|
19 | 19 | python_version: 3.11
|
20 | 20 |
|
21 | 21 | jobs:
|
| 22 | + MacOS_C_API_Packaging_CPU_x86_64: |
| 23 | + runs-on: macos-13 |
| 24 | + steps: |
| 25 | + - name: Checkout repository |
| 26 | + uses: actions/checkout@v3 |
| 27 | + with: |
| 28 | + submodules: false |
| 29 | + |
| 30 | + - name: Use Python |
| 31 | + uses: actions/setup-python@v5 |
| 32 | + with: |
| 33 | + python-version: ${{ env.python_version }} |
| 34 | + |
| 35 | + - name: Use Node.js 20.x |
| 36 | + uses: actions/setup-node@v4 |
| 37 | + with: |
| 38 | + node-version: '20.x' |
| 39 | + |
| 40 | + - name: Install Java 17 |
| 41 | + uses: actions/setup-java@v4 |
| 42 | + with: |
| 43 | + distribution: 'temurin' |
| 44 | + java-version: '17' |
| 45 | + architecture: x64 |
| 46 | + |
| 47 | + - name: Set version number variables for Unix |
| 48 | + shell: bash |
| 49 | + run: | |
| 50 | + # Do not output ##vso[] commands with `set -x` or they may be parsed again and include a trailing quote. |
| 51 | + set +x |
| 52 | +
|
| 53 | + _OnnxRuntimeVersion=$(head -1 ${{ github.workspace }}/VERSION_NUMBER) |
| 54 | + echo "OnnxRuntimeVersion=$_OnnxRuntimeVersion" |
| 55 | +
|
| 56 | + _OnnxRuntimeGitCommitHash=$(git rev-parse HEAD) |
| 57 | + echo "OnnxRuntimeGitCommitHash=$_OnnxRuntimeGitCommitHash" |
| 58 | +
|
| 59 | + _OnnxRuntimeGitCommitHash=$(git rev-parse --short=8 HEAD) |
| 60 | + echo "OnnxRuntimeGitCommitHashShort=$_OnnxRuntimeGitCommitHash" |
| 61 | + working-directory: ${{ github.workspace }} |
| 62 | + |
| 63 | + - name: Use Xcode 14.3.1 |
| 64 | + shell: bash |
| 65 | + run: | |
| 66 | + set -e -x |
| 67 | + XCODE_DEVELOPER_DIR="/Applications/Xcode_14.3.1.app/Contents/Developer" |
| 68 | + sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}" |
| 69 | +
|
| 70 | + - name: Setup environment variables |
| 71 | + shell: bash |
| 72 | + run: | |
| 73 | + set -e -x |
| 74 | + export PATH=${{ github.workspace }}/installed/bin:$PATH |
| 75 | + export ONNX_ML=1 |
| 76 | + export CMAKE_ARGS="-DONNX_GEN_PB_TYPE_STUBS=ON -DONNX_WERROR=OFF" |
| 77 | + python3 -m pip install -r '${{ github.workspace }}/tools/ci_build/github/linux/docker/scripts/requirements.txt' |
| 78 | +
|
| 79 | + - name: Export GitHub Actions cache environment variables |
| 80 | + uses: actions/github-script@v7 |
| 81 | + with: |
| 82 | + script: | |
| 83 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 84 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| 85 | +
|
| 86 | + - name: Configure Build (build.py --update) |
| 87 | + shell: bash |
| 88 | + run: | |
| 89 | + set -e -x |
| 90 | + rm -rf ${{ github.workspace }}/Release |
| 91 | + 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 |
| 92 | +
|
| 93 | + - name: Build (build.py --build) |
| 94 | + shell: bash |
| 95 | + run: | |
| 96 | + set -e -x |
| 97 | + 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 |
| 98 | +
|
| 99 | + - name: Install |
| 100 | + shell: bash |
| 101 | + run: | |
| 102 | + set -e -x |
| 103 | + cd ${{ github.workspace }}/Release |
| 104 | + make install DESTDIR=${{ github.workspace }}/installed |
| 105 | +
|
| 106 | + - name: Running Tests (build.py --test) |
| 107 | + shell: bash |
| 108 | + run: | |
| 109 | + set -e -x |
| 110 | + 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 |
| 111 | + timeout-minutes: 300 |
| 112 | + env: |
| 113 | + MACOSX_DEPLOYMENT_TARGET: '13.3' |
| 114 | + ALLOW_RELEASED_ONNX_OPSET_ONLY: '0' |
| 115 | + |
22 | 116 | ARM64-Xcode16:
|
23 | 117 | runs-on: macos-15
|
24 | 118 |
|
|
0 commit comments