refactor(windows): [release-0.1] state that the zlib is v1.2.3 (#12) #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: download and deploy | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "バージョン情報(A.BB.C / A.BB.C-preview.D)" | |
| required: true | |
| env: | |
| # releaseタグ名か、workflow_dispatchでのバージョン名か、DEBUGが入る | |
| VERSION: ${{ github.event.release.tag_name || github.event.inputs.version || 'DEBUG' }} | |
| jobs: | |
| download_zlib_for_windows_cuda: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Cache | |
| id: cache | |
| uses: actions/cache@v4 | |
| with: | |
| key: zlib-for-windows-cuda-v1.2.3 | |
| path: zlibwapi.dll | |
| # NOTE: CUDAのcudnnに必要 | |
| # FIXME: ワークアラウンド処理。本当は自分でビルドした方が良い。 | |
| - name: Download and take zlibwapi.dll v1.2.3 | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| run: | | |
| curl -fLO --retry 3 --retry-delay 5 \ | |
| https://github.com/VOICEVOX/voicevox_engine/releases/download/0.14.0/voicevox_engine-windows-nvidia-0.14.0.7z.001 | |
| 7z x voicevox_engine-windows-nvidia-0.14.0.7z.001 windows-nvidia/zlibwapi.dll | |
| mv windows-nvidia/zlibwapi.dll . | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: zlib-for-windows-cuda | |
| path: zlibwapi.dll | |
| download_and_deploy_cuda: | |
| needs: [download_zlib_for_windows_cuda] | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows-2022 | |
| artifact_name: windows-x64 | |
| cudnn_download_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.2.26_cuda11-archive.zip | |
| cuda_version: 11.8.0 | |
| - os: ubuntu-22.04 | |
| artifact_name: linux-x64 | |
| cudnn_download_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.2.26_cuda11-archive.tar.xz | |
| cuda_version: 11.8.0 | |
| env: | |
| ASSET_NAME: CUDA-${{ matrix.artifact_name }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| # CUDAで容量不足になるので容量削減 | |
| - name: Free Disk Space | |
| uses: jlumbroso/free-disk-space@main | |
| if: runner.os == 'Linux' | |
| with: | |
| tool-cache: false | |
| large-packages: false | |
| swap-storage: false | |
| - uses: actions/checkout@v3 | |
| - name: Prepare directory | |
| shell: bash | |
| run: | | |
| mkdir -p artifact/${{ env.ASSET_NAME }} | |
| - name: Organize cuda lib artifact | |
| uses: ./.github/actions/download-cuda-libraries | |
| with: | |
| cudnn_download_url: ${{ matrix.cudnn_download_url }} | |
| asset_name: ${{ env.ASSET_NAME }} | |
| cuda_version: ${{ matrix.cuda_version }} | |
| extract_dir: artifact/${{ env.ASSET_NAME }} | |
| - name: Download zlibwapi.dll | |
| if: runner.os == 'Windows' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: zlib-for-windows-cuda | |
| path: zlib_for_windows_cuda | |
| - name: Include zlibwapi.dll | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: mv zlib_for_windows_cuda/zlibwapi.dll artifact/ | |
| - name: Upload CUDA | |
| if: ${{ env.VERSION != 'DEBUG' && env.SKIP_UPLOADING_RELEASE_ASSET == '0' }} | |
| uses: ./.github/actions/upload-artifact | |
| with: | |
| artifact_dir: artifact | |
| asset_name: ${{ env.ASSET_NAME }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| version: ${{ env.VERSION }} | |
| download_and_deploy_directml: | |
| strategy: | |
| matrix: | |
| include: | |
| - platform: x64-win | |
| artifact_name: windows-x64 | |
| directml_version: 1.10.0 | |
| env: | |
| ASSET_NAME: DirectML-${{ matrix.artifact_name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Prepare directory | |
| shell: bash | |
| run: | | |
| mkdir -p artifact/${{ env.ASSET_NAME }} | |
| - name: Download DirectML | |
| shell: bash | |
| run: | | |
| directml_link="https://api.nuget.org/v3-flatcontainer/microsoft.ai.directml/${{ matrix.directml_version }}/microsoft.ai.directml.${{ matrix.directml_version }}.nupkg" | |
| curl -sSLO $directml_link | |
| - name: Extract DirectML | |
| shell: bash | |
| run: | | |
| unzip -d ext_directml microsoft.ai.directml.${{ matrix.directml_version }}.nupkg | |
| cp -v "ext_directml/bin/${{ matrix.platform }}/DirectML.dll" "artifact/${{ env.ASSET_NAME }}" | |
| cp -v "ext_directml/LICENSE.txt" "artifact/${{ env.ASSET_NAME }}/DirectML_LICENSE.txt" | |
| - name: Upload DirectML | |
| if: ${{ env.VERSION != 'DEBUG' && env.SKIP_UPLOADING_RELEASE_ASSET == '0' }} | |
| uses: ./.github/actions/upload-artifact | |
| with: | |
| artifact_dir: artifact | |
| asset_name: ${{ env.ASSET_NAME }} | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| version: ${{ env.VERSION }} |