Add onnxtestdata cache for win-web-multi-browsers pipeline (#22477)

### Description

Apply onnxtestdata cache to win-web-multi-browsers pipeline

Same change that applied to win-web-ci #16659
This commit is contained in:
Yulong Wang 2024-10-17 12:03:29 -07:00 committed by GitHub
parent d649cac9af
commit 1247d69c28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,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
@ -60,6 +63,14 @@ jobs:
npm ci
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'npm ci /js/web/'
- 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
path: $(Build.SourcesDirectory)/js/test/
cacheHitVar: CACHE_RESTORED
displayName: 'Cache ONNX node test data'
- script: |
powershell "Get-WmiObject Win32_Process -Filter \"name = 'chrome.exe'\" | Format-List CommandLine"
displayName: 'Check active Chrome processes (before test)'
@ -87,6 +98,3 @@ jobs:
npm test -- suite0 -b=wasm,webgl -e=edge --wasm.initTimeout=30000 --file-cache --user-data-dir=$(Agent.TempDirectory)\web\test_multi_browsers\03
workingDirectory: '$(Build.SourcesDirectory)\js\web'
displayName: 'npm test (Suite0, Edge)'
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
displayName: 'Clean Agent Directories'
condition: always()