From 685ffc1d41fab95ad1f9adc4098da5e7a4eda39d Mon Sep 17 00:00:00 2001 From: sarisia Date: Thu, 29 Dec 2022 12:22:45 +0000 Subject: [PATCH] matrix.artifact_name -> matrix.target --- .github/workflows/build.yml | 40 ++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da6f2efa9..df8bb449e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,14 +51,14 @@ jobs: architecture: "x64" voicevox_core_asset_prefix: voicevox_core-windows-x64-cpu onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-win-x64-1.13.1.zip - artifact_name: windows-cpu + target: windows-cpu # Windows DirectML - os: windows-2019 architecture: "x64" voicevox_core_asset_prefix: voicevox_core-windows-x64-directml onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/Microsoft.ML.OnnxRuntime.DirectML.1.13.1.zip directml_url: https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.10.0 - artifact_name: windows-directml + target: windows-directml # Windows NVIDIA GPU - os: windows-2019 architecture: "x64" @@ -66,19 +66,19 @@ jobs: onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-win-x64-gpu-1.13.1.zip cuda_version: "11.6.2" 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 - artifact_name: windows-nvidia + target: windows-nvidia # Mac CPU (x64 arch only) - os: macos-11 architecture: "x64" voicevox_core_asset_prefix: voicevox_core-osx-x64-cpu onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-osx-x86_64-1.13.1.tgz - artifact_name: macos-x64 + target: macos-x64 # Linux CPU - os: ubuntu-20.04 architecture: "x64" voicevox_core_asset_prefix: voicevox_core-linux-x64-cpu onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-linux-x64-1.13.1.tgz - artifact_name: linux-cpu + target: linux-cpu # Linux NVIDIA GPU - os: ubuntu-20.04 architecture: "x64" @@ -86,7 +86,7 @@ jobs: onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.13.1/onnxruntime-linux-x64-gpu-1.13.1.tgz cuda_version: "11.6.2" 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 - artifact_name: linux-nvidia + target: linux-nvidia runs-on: ${{ matrix.os }} @@ -95,7 +95,7 @@ jobs: id: vars shell: bash run: | - echo "artifact_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT + echo "artifact_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 @@ -114,7 +114,7 @@ jobs: # ONNX Runtime providersとCUDA周りをリンクするために使う - name: Install patchelf - if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.artifact_name, 'nvidia') + if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia') run: | sudo apt-get update sudo apt-get install -y patchelf @@ -265,12 +265,12 @@ jobs: # Donwload DirectML - name: Export DirectML url to calc hash - if: endswith(matrix.artifact_name, '-directml') + if: endswith(matrix.target, '-directml') shell: bash run: echo "${{ matrix.directml_url }}" >> download/directml_url.txt - name: Cache DirectML - if: endswith(matrix.artifact_name, '-directml') + if: endswith(matrix.target, '-directml') uses: actions/cache@v3 id: directml-cache with: @@ -278,7 +278,7 @@ jobs: path: download/directml - name: Download DirectML - if: steps.directml-cache.outputs.cache-hit != 'true' && endswith(matrix.artifact_name, '-directml') + if: steps.directml-cache.outputs.cache-hit != 'true' && endswith(matrix.target, '-directml') shell: bash run: | curl -L "${{ matrix.directml_url }}" -o download/directml.zip @@ -309,7 +309,7 @@ jobs: curl -L "${{ matrix.onnxruntime_url }}" > download/onnxruntime.zip # extract only dlls - if [[ ${{ matrix.artifact_name }} != *-directml ]]; then + if [[ ${{ matrix.target }} != *-directml ]]; then unzip download/onnxruntime.zip onnxruntime-*/lib/*.dll -d download/ mv download/onnxruntime-* download/onnxruntime else @@ -461,13 +461,13 @@ jobs: ln -sf "$(pwd)/download/cudnn/bin"/cudnn_*_infer64*.dll dist/run/ fi - if [[ ${{ matrix.artifact_name }} == *-directml ]]; then + if [[ ${{ matrix.target }} == *-directml ]]; then # DirectML ln -sf "$(pwd)/download/directml"/DirectML.dll dist/run/ fi - name: Create symlink of CUDA dependencies - if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.artifact_name, 'nvidia') + if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia') shell: bash run: | set -eux @@ -513,7 +513,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - artifact_name: + target: - macos-x64 - linux-cpu - linux-nvidia @@ -525,10 +525,10 @@ jobs: id: vars shell: bash run: | - echo "package_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version }}" >> $GITHUB_OUTPUT + echo "package_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version }}" >> $GITHUB_OUTPUT : # this is exactly same as `steps.vars.outputs.artifact_name` in `build-all` job, : # but since we cannot get the job outputs of matrix builds correctly, we need to redefine here. - echo "artifact_name=voicevox_engine-${{ matrix.artifact_name }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT + echo "artifact_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version_or_latest }}-${{ github.sha }}" >> $GITHUB_OUTPUT - uses: actions/checkout@v3 @@ -542,15 +542,15 @@ jobs: uses: actions/download-artifact@v3 with: name: ${{ steps.vars.outputs.artifact_name }} - path: ${{ matrix.artifact_name }}/ + path: ${{ matrix.target }}/ - name: Rearchive and split artifact run: | # Compress to artifact.7z.001, artifact.7z.002, ... - 7z -r -v2g a "${{ steps.vars.outputs.package_name }}.7z" "${{ matrix.artifact_name }}/" + 7z -r -v2g a "${{ steps.vars.outputs.package_name }}.7z" "${{ matrix.target }}/" # Compress to artifact.001.vvpp,artifact.002.vvpp, ... - (cd "${{ matrix.artifact_name }}" && zip -r - . > ../compressed.zip) + (cd "${{ matrix.target }}" && zip -r - . > ../compressed.zip) split -b 2G --numeric-suffixes=1 -a 3 --additional-suffix .vvpp ./compressed.zip ./${{ steps.vars.outputs.package_name }}. # Rename to artifact.vvpp if there are only artifact.001.vvpp