mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
Use pipeline cache to cache onnx node test data. (#16659)
### Description Use pipeline cache instead of reading data from the image. ### Motivation and Context 1. To reduce the browser dependency of custom image. 2. The onnx node test data is less than 30M and the cache download time is very short.
This commit is contained in:
parent
111382746e
commit
f3b40abe29
2 changed files with 22 additions and 18 deletions
|
|
@ -30,6 +30,9 @@ jobs:
|
|||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
- checkout: self
|
||||
submodules: false
|
||||
- task: DownloadPipelineArtifact@2
|
||||
|
|
@ -115,12 +118,14 @@ jobs:
|
|||
node -e "a=require('child_process').execSync('git diff --name-only').toString();if(a)throw new Error('Following documents are not up-to-date: (did you run \"npm run build:doc\"?)\n'+a)"
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/web'
|
||||
displayName: 'Check out of dated documents'
|
||||
- script: |
|
||||
if [[ -e "/data/onnx/test/data/node/__generated_onnx_node_tests" ]] then
|
||||
cp -r /data/onnx/test/ $(Build.SourcesDirectory)/js/test/
|
||||
fi
|
||||
workingDirectory: '$(Build.SourcesDirectory)/js/web'
|
||||
displayName: 'Copy pre-downloaded test data'
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: onnxtestdata | $(Build.SourcesDirectory)\js\scripts\prepare-onnx-node-tests.ts
|
||||
restoreKeys: |
|
||||
onnxtestdata | $(Build.SourcesDirectory)\js\scripts\prepare-onnx-node-tests.ts
|
||||
onnxtestdata
|
||||
path: $(Build.SourcesDirectory)/js/test/
|
||||
displayName: 'Cache ONNX node test data'
|
||||
- task: PowerShell@2
|
||||
inputs:
|
||||
filePath: '$(Build.SourcesDirectory)/tools/ci_build/github/js/pack-npm-packages.ps1'
|
||||
|
|
@ -169,6 +174,3 @@ jobs:
|
|||
- template: component-governance-component-detection-steps.yml
|
||||
parameters :
|
||||
condition : 'succeeded'
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ jobs:
|
|||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
- checkout: self
|
||||
submodules: false
|
||||
- task: DownloadPipelineArtifact@2
|
||||
|
|
@ -123,12 +126,14 @@ jobs:
|
|||
node -e "a=require('child_process').execSync('git diff --name-only').toString();if(a)throw new Error('Following documents are not up-to-date: (did you run \"npm run build:doc\"?)\n'+a)"
|
||||
workingDirectory: '$(Build.SourcesDirectory)\js\web'
|
||||
displayName: 'Check out of dated documents'
|
||||
- script: |
|
||||
if exist "C:\local\data\onnx\test\data\node\__generated_onnx_node_tests" (
|
||||
xcopy C:\local\data\onnx\test\ $(Build.SourcesDirectory)\js\test\ /E
|
||||
)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\js\web'
|
||||
displayName: 'Copy pre-downloaded test data'
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: onnxtestdata | $(Build.SourcesDirectory)\js\scripts\prepare-onnx-node-tests.ts
|
||||
restoreKeys: |
|
||||
onnxtestdata | $(Build.SourcesDirectory)\js\scripts\prepare-onnx-node-tests.ts
|
||||
onnxtestdata
|
||||
path: $(Build.SourcesDirectory)/js/test/
|
||||
displayName: 'Cache ONNX node test data'
|
||||
- task: PowerShell@2
|
||||
inputs:
|
||||
filePath: '$(Build.SourcesDirectory)\tools\ci_build\github\js\pack-npm-packages.ps1'
|
||||
|
|
@ -177,6 +182,3 @@ jobs:
|
|||
- template: component-governance-component-detection-steps.yml
|
||||
parameters :
|
||||
condition : 'succeeded'
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
|
|
|
|||
Loading…
Reference in a new issue