microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
.pipelines/templates/build-package-for-macosx.yml
52lines · modecode
| 1 | parameters: |
| 2 | - name: AdditionalBuildFlags |
| 3 | displayName: Additional build flags for build.sh |
| 4 | type: string |
| 5 | |
| 6 | - name: IsReleaseBuild |
| 7 | displayName: "Is this a release build?" |
| 8 | type: boolean |
| 9 | default: false |
| 10 | |
| 11 | stages: |
| 12 | - stage: MacOS_C_API_Packaging_CPU |
| 13 | dependsOn: [] |
| 14 | jobs: |
| 15 | - template: mac-shared-lib-build.yml |
| 16 | parameters: |
| 17 | MacosArch: 'x86_64' |
| 18 | AdditionalBuildFlags: ${{ parameters.AdditionalBuildFlags }} |
| 19 | |
| 20 | - template: mac-shared-lib-build.yml |
| 21 | parameters: |
| 22 | MacosArch: 'arm64' |
| 23 | AdditionalBuildFlags: "${{ parameters.AdditionalBuildFlags }} CMAKE_OSX_ARCHITECTURES=arm64" |
| 24 | - template: mac-shared-lib-build.yml |
| 25 | parameters: |
| 26 | MacosArch: 'universal2' |
| 27 | AdditionalBuildFlags: "${{ parameters.AdditionalBuildFlags }} CMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\"" |
| 28 | - job: MacOS_C_API_Package_Publish_All |
| 29 | dependsOn: |
| 30 | - MacOS_C_API_Packaging_CPU_x86_64 |
| 31 | - MacOS_C_API_Packaging_CPU_arm64 |
| 32 | - MacOS_C_API_Packaging_CPU_universal2 |
| 33 | pool: |
| 34 | vmImage: 'macOS-12' |
| 35 | steps: |
| 36 | - task: DownloadPipelineArtifact@2 |
| 37 | inputs: |
| 38 | artifact: 'onnxruntime-extensions-osx-x86_64' |
| 39 | targetPath: '$(Build.ArtifactStagingDirectory)' |
| 40 | - task: DownloadPipelineArtifact@2 |
| 41 | inputs: |
| 42 | artifact: 'onnxruntime-extensions-osx-arm64' |
| 43 | targetPath: '$(Build.ArtifactStagingDirectory)' |
| 44 | - task: DownloadPipelineArtifact@2 |
| 45 | inputs: |
| 46 | artifact: 'onnxruntime-extensions-osx-universal2' |
| 47 | targetPath: '$(Build.ArtifactStagingDirectory)' |
| 48 | - task: PublishPipelineArtifact@1 |
| 49 | inputs: |
| 50 | targetPath: '$(Build.ArtifactStagingDirectory)' |
| 51 | artifact: 'onnxruntime-extensions-osx' |
| 52 | condition: 'succeededOrFailed()' |
| 53 | |