mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-15 01:23:42 +00:00
### Description 1. Replacing jobs with stages for better debugging and maintainance 2. Added compilation cache to accelerate the workflow. 3. Splited building protobuf and major code as 2 tasks ### Motivation and Context Reduced compilation time about one hour. test run: https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=943695&view=logs&j=de302ec2-2305-57e0-e8c6-cd89c569f2a3&t=8b360243-7783-51da-8079-2304089d3d1d
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
# It's used for compilation with cache in Mac Host.
|
|
|
|
parameters:
|
|
- name: TODAY
|
|
type: string
|
|
|
|
- name: BuildStep
|
|
type: stepList
|
|
|
|
- name: AdditionalKey
|
|
type: string
|
|
|
|
- name: CacheDir
|
|
type: string
|
|
|
|
- name: ChangeEveryCommit
|
|
type: boolean
|
|
default: true
|
|
|
|
steps:
|
|
- script: |
|
|
which ccache || brew install ccache
|
|
echo "##vso[task.prependpath]/usr/local/opt/ccache/libexec"
|
|
mkdir -p "${{ parameters.CacheDir }}"
|
|
displayName: Install ccache and update PATH to use linked versions of gcc, cc, etc
|
|
|
|
- task: Cache@2
|
|
inputs:
|
|
${{ if eq(parameters.ChangeEveryCommit, true) }}:
|
|
key: ' "${{parameters.TODAY}}" | ${{parameters.AdditionalKey}} | "$(Build.SourceVersion)" '
|
|
restoreKeys: |
|
|
"${{parameters.TODAY}}" | ${{parameters.AdditionalKey}}
|
|
${{ else }}:
|
|
key: ' ${{parameters.AdditionalKey}} '
|
|
restoreKeys: |
|
|
${{parameters.AdditionalKey}}
|
|
path: ${{ parameters.CacheDir }}
|
|
displayName: ccache task
|
|
|
|
- ${{ parameters.BuildStep }}
|
|
|
|
- template: check-cache-stats.yml
|
|
parameters:
|
|
CacheDir: ${{ parameters.CacheDir }}
|