Skip to content

Commit d2b3ed4

Browse files
committed
matrix.artifact_name -> matrix.target
1 parent ff5bfe3 commit d2b3ed4

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,42 +51,42 @@ jobs:
5151
architecture: "x64"
5252
voicevox_core_asset_prefix: voicevox_core-windows-x64-cpu
5353
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/onnxruntime-win-x64-1.11.1.zip
54-
artifact_name: windows-cpu
54+
target: windows-cpu
5555
# Windows DirectML
5656
- os: windows-2019
5757
architecture: "x64"
5858
voicevox_core_asset_prefix: voicevox_core-windows-x64-directml
5959
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/Microsoft.ML.OnnxRuntime.DirectML.1.11.1.zip
6060
directml_url: https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.9.0
61-
artifact_name: windows-directml
61+
target: windows-directml
6262
# Windows NVIDIA GPU
6363
- os: windows-2019
6464
architecture: "x64"
6565
voicevox_core_asset_prefix: voicevox_core-windows-x64-cuda
6666
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/onnxruntime-win-x64-gpu-1.11.1.zip
6767
cuda_version: "11.6.0"
6868
cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.4.1/local_installers/11.6/cudnn-windows-x86_64-8.4.1.50_cuda11.6-archive.zip
69-
artifact_name: windows-nvidia
69+
target: windows-nvidia
7070
# Mac CPU (x64 arch only)
7171
- os: macos-11
7272
architecture: "x64"
7373
voicevox_core_asset_prefix: voicevox_core-osx-x64-cpu
7474
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/onnxruntime-osx-x86_64-1.11.1.tgz
75-
artifact_name: macos-x64
75+
target: macos-x64
7676
# Linux CPU
7777
- os: ubuntu-20.04
7878
architecture: "x64"
7979
voicevox_core_asset_prefix: voicevox_core-linux-x64-cpu
8080
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/onnxruntime-linux-x64-1.11.1.tgz
81-
artifact_name: linux-cpu
81+
target: linux-cpu
8282
# Linux NVIDIA GPU
8383
- os: ubuntu-20.04
8484
architecture: "x64"
8585
voicevox_core_asset_prefix: voicevox_core-linux-x64-gpu
8686
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.11.1/onnxruntime-linux-x64-gpu-1.11.1.tgz
8787
cuda_version: "11.6.0"
8888
cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.4.1/local_installers/11.6/cudnn-linux-x86_64-8.4.1.50_cuda11.6-archive.tar.xz
89-
artifact_name: linux-nvidia
89+
target: linux-nvidia
9090

9191
runs-on: ${{ matrix.os }}
9292

@@ -95,7 +95,7 @@ jobs:
9595
id: vars
9696
shell: bash
9797
run: |
98-
echo "artifact_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT
98+
echo "artifact_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT
9999
100100
- uses: actions/checkout@v3
101101

@@ -114,7 +114,7 @@ jobs:
114114

115115
# ONNX Runtime providersとCUDA周りをリンクするために使う
116116
- name: Install patchelf
117-
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.artifact_name, 'nvidia')
117+
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia')
118118
run: |
119119
sudo apt-get update
120120
sudo apt-get install -y patchelf
@@ -265,20 +265,20 @@ jobs:
265265

266266
# Donwload DirectML
267267
- name: Export DirectML url to calc hash
268-
if: endswith(matrix.artifact_name, '-directml')
268+
if: endswith(matrix.target, '-directml')
269269
shell: bash
270270
run: echo "${{ matrix.directml_url }}" >> download/directml_url.txt
271271

272272
- name: Cache DirectML
273-
if: endswith(matrix.artifact_name, '-directml')
273+
if: endswith(matrix.target, '-directml')
274274
uses: actions/cache@v3
275275
id: directml-cache
276276
with:
277277
key: directml-cache-v1-${{ hashFiles('download/directml_url.txt') }}
278278
path: download/directml
279279

280280
- name: Download DirectML
281-
if: steps.directml-cache.outputs.cache-hit != 'true' && endswith(matrix.artifact_name, '-directml')
281+
if: steps.directml-cache.outputs.cache-hit != 'true' && endswith(matrix.target, '-directml')
282282
shell: bash
283283
run: |
284284
curl -L "${{ matrix.directml_url }}" -o download/directml.zip
@@ -309,7 +309,7 @@ jobs:
309309
curl -L "${{ matrix.onnxruntime_url }}" > download/onnxruntime.zip
310310
311311
# extract only dlls
312-
if [[ ${{ matrix.artifact_name }} != *-directml ]]; then
312+
if [[ ${{ matrix.target }} != *-directml ]]; then
313313
unzip download/onnxruntime.zip onnxruntime-*/lib/*.dll -d download/
314314
mv download/onnxruntime-* download/onnxruntime
315315
else
@@ -461,13 +461,13 @@ jobs:
461461
ln -sf "$(pwd)/download/cudnn/bin"/cudnn_*_infer64*.dll dist/run/
462462
fi
463463
464-
if [[ ${{ matrix.artifact_name }} == *-directml ]]; then
464+
if [[ ${{ matrix.target }} == *-directml ]]; then
465465
# DirectML
466466
ln -sf "$(pwd)/download/directml"/DirectML.dll dist/run/
467467
fi
468468
469469
- name: Create symlink of CUDA dependencies
470-
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.artifact_name, 'nvidia')
470+
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia')
471471
shell: bash
472472
run: |
473473
set -eux
@@ -513,7 +513,7 @@ jobs:
513513
runs-on: ubuntu-latest
514514
strategy:
515515
matrix:
516-
artifact_name:
516+
target:
517517
- macos-x64
518518
- linux-cpu
519519
- linux-nvidia
@@ -525,10 +525,10 @@ jobs:
525525
id: vars
526526
shell: bash
527527
run: |
528-
echo "package_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version }}" >> $GITHUB_OUTPUT
528+
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version }}" >> $GITHUB_OUTPUT
529529
: # this is exactly same as `steps.vars.outputs.artifact_name` in `build-all` job,
530530
: # but since we cannot get the job outputs of matrix builds correctly, we need to redefine here.
531-
echo "artifact_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT
531+
echo "artifact_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT
532532
533533
- uses: actions/checkout@v3
534534

@@ -542,15 +542,15 @@ jobs:
542542
uses: actions/download-artifact@v3
543543
with:
544544
name: ${{ steps.vars.outputs.artifact_name }}
545-
path: ${{ matrix.artifact_name }}/
545+
path: ${{ matrix.target }}/
546546

547547
- name: Rearchive and split artifact
548548
run: |
549549
# Compress to artifact.7z.001, artifact.7z.002, ...
550-
7z -r -v2g a "${{ steps.vars.outputs.package_name }}.7z" "${{ matrix.artifact_name }}/"
550+
7z -r -v2g a "${{ steps.vars.outputs.package_name }}.7z" "${{ matrix.target }}/"
551551
552552
# Compress to artifact.001.vvpp,artifact.002.vvpp, ...
553-
(cd "${{ matrix.artifact_name }}" && zip -r - . > ../compressed.zip)
553+
(cd "${{ matrix.target }}" && zip -r - . > ../compressed.zip)
554554
split -b 2G --numeric-suffixes=1 -a 3 --additional-suffix .vvpp ./compressed.zip ./${{ steps.vars.outputs.package_name }}.
555555
556556
# Rename to artifact.vvpp if there are only artifact.001.vvpp

0 commit comments

Comments
 (0)