Skip to content

Commit afaf4a5

Browse files
authored
add cache "onnxnodetests" for node tests (#24150)
### Description add cache "onnxnodetests" for node tests This fixes the random download network error for onnx node tests data. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
1 parent 618aef7 commit afaf4a5

6 files changed

+40
-4
lines changed

.github/workflows/macos-ci-build-and-test-workflow.yml

+6
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
xcode_version: ${{ matrix.xcode_version }}
6666
use_cache: true
6767

68+
- uses: actions/cache@v3
69+
id: onnx-node-tests-cache
70+
with:
71+
path: ${{ github.workspace }}/js/test/
72+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
73+
6874
- name: Setup environment variables
6975
shell: bash
7076
run: |

.github/workflows/windows_cuda.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ jobs:
6565
java-version: '17'
6666
architecture: x64
6767

68+
- uses: actions/cache@v3
69+
id: onnx-node-tests-cache
70+
with:
71+
path: ${{ github.workspace }}/js/test/
72+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
73+
6874
- name: API Documentation Check and generate
6975
run: |
7076
set ORT_DOXY_SRC=${{ github.workspace }}
@@ -132,4 +138,4 @@ jobs:
132138
DocUpdateNeeded: false
133139
ONNXRUNTIME_TEST_GPU_DEVICE_ID: '0'
134140
AZCOPY_AUTO_LOGIN_TYPE: MSI
135-
AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4
141+
AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4

.github/workflows/windows_webgpu.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ jobs:
9191
shell: cmd
9292
working-directory: ${{ github.workspace }}
9393

94+
- uses: actions/cache@v3
95+
id: onnx-node-tests-cache
96+
with:
97+
path: ${{ github.workspace }}/js/test/
98+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
99+
94100
- name: Export GitHub Actions cache environment variables
95101
uses: actions/github-script@v7
96102
with:
@@ -259,4 +265,4 @@ jobs:
259265
- name: Validate C# native delegates
260266
run: python tools\ValidateNativeDelegateAttributes.py
261267
shell: cmd
262-
working-directory: ${{ github.workspace }}\csharp
268+
working-directory: ${{ github.workspace }}\csharp

.github/workflows/windows_x64_debug_build_x64_debug.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ jobs:
7575
run: |
7676
nuget restore ${{ github.workspace }}\packages.config -PackagesDirectory ${{ github.workspace }}\build\Debug -ConfigFile ${{ github.workspace }}\NuGet.config
7777
78+
- uses: actions/cache@v3
79+
id: onnx-node-tests-cache
80+
with:
81+
path: ${{ github.workspace }}/js/test/
82+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
83+
7884
- name: Export GitHub Actions cache environment variables
7985
uses: actions/github-script@v7
8086
with:
@@ -126,4 +132,4 @@ jobs:
126132
env:
127133
OrtPackageId: Microsoft.ML.OnnxRuntime
128134
OnnxRuntimeBuildDirectory: ${{ github.workspace }}\build
129-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
135+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'

.github/workflows/windows_x64_release_build_x64_release.yml

+6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ jobs:
7575
run: |
7676
nuget restore ${{ github.workspace }}\packages.config -PackagesDirectory ${{ github.workspace }}\build\RelWithDebInfo -ConfigFile ${{ github.workspace }}\NuGet.config
7777
78+
- uses: actions/cache@v3
79+
id: onnx-node-tests-cache
80+
with:
81+
path: ${{ github.workspace }}/js/test/
82+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
83+
7884
- name: Export GitHub Actions cache environment variables
7985
uses: actions/github-script@v7
8086
with:

.github/workflows/windows_x64_release_dnnl_build_x64_release.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ jobs:
7575
run: |
7676
nuget restore ${{ github.workspace }}\packages.config -PackagesDirectory ${{ github.workspace }}\build\RelWithDebInfo -ConfigFile ${{ github.workspace }}\NuGet.config
7777
78+
- uses: actions/cache@v3
79+
id: onnx-node-tests-cache
80+
with:
81+
path: ${{ github.workspace }}/js/test/
82+
key: onnxnodetests-${{ hashFiles('js/scripts/prepare-onnx-node-tests.ts') }}
83+
7884
- name: Export GitHub Actions cache environment variables
7985
uses: actions/github-script@v7
8086
with:
@@ -122,4 +128,4 @@ jobs:
122128
env:
123129
OrtPackageId: Microsoft.ML.OnnxRuntime
124130
OnnxRuntimeBuildDirectory: ${{ github.workspace }}\build
125-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'
131+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true'

0 commit comments

Comments
 (0)