File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
actions/cache-onnxruntime Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Cache ONNX Runtime
2+ description : voicevox-ortクレートがダウンロードするONNX Runtimeをキャッシュする。voicevox-ortがシンボリックリンクを利用するmacOSとLinuxだけ対象で、Windowsは対象外。
3+
4+ inputs :
5+ key :
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ - id : cache-dir-location
12+ shell : bash
13+ run : |
14+ case "$RUNNER_OS" in
15+ macOS) cache_dir=/Users/runner/.cache ;;
16+ Linux) cache_dir=/home/runner/Library/Caches ;;
17+ *)
18+ echo 'OS must be macOS or Linux' >&2
19+ exit 1
20+ esac
21+
22+ echo cache-dir=$cache_dir >> "$GITHUB_OUTPUT"
23+
24+ - uses : actions/cache@v4
25+ with :
26+ key : ${{ inputs.key }}
27+ path : ${{ steps.cache-dir-location.outputs.cache-dir }}/voicevox_ort/dfbin
Original file line number Diff line number Diff line change @@ -166,6 +166,11 @@ jobs:
166166 python-version : " 3.10"
167167 - name : Set up Rust
168168 uses : ./.github/actions/rust-toolchain-from-file
169+ - name : Cache ONNX Runtime
170+ if : runner.os == 'macOS' || runner.os == 'Linux'
171+ uses : ./.github/actions/cache-onnxruntime
172+ with :
173+ key : cargo-integration-test-ort-${{ matrix.os }}
169174 - uses : Swatinem/rust-cache@v2
170175 with :
171176 key : " cargo-integration-test-cache-${{ matrix.os }}"
You can’t perform that action at this time.
0 commit comments