Skip to content

Commit

Permalink
sedとsplitをenvに入れて明示的に実行
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jun 19, 2023
1 parent f27468f commit 1ca5623
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ jobs:

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

env:
# GNUコマンド
sed: ${{ matrix.os == 'macos-11' && 'gsed' || 'sed' }}
split: ${{ matrix.os == 'macos-11' && 'gsplit' || 'split' }}

steps:
- name: declare variables
id: vars
Expand All @@ -113,8 +118,6 @@ jobs:
if: startsWith(matrix.os, 'macos-')
run: |
brew install gnu-sed coreutils
echo "/usr/local/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
echo "/usr/local/opt/coreutils/libexec/gnubin" >> $GITHUB_PATH
# ONNX Runtime providersとCUDA周りをリンクするために使う
- name: Install patchelf
Expand Down Expand Up @@ -414,7 +417,7 @@ jobs:
mv -f engine_manifest.json.tmp engine_manifest.json
# Replace version & specify dynamic libraries
sed -i "s/__version__ = \"latest\"/__version__ = \"${{ needs.config.outputs.version_or_latest }}\"/" voicevox_engine/__init__.py
$sed -i "s/__version__ = \"latest\"/__version__ = \"${{ needs.config.outputs.version_or_latest }}\"/" voicevox_engine/__init__.py
if [[ ${{ matrix.os }} == windows-* ]]; then
LIBCORE_PATH=download/core/voicevox_core.dll
LIBONNXRUNTIME_PATH=download/onnxruntime/lib/onnxruntime.dll
Expand Down Expand Up @@ -508,7 +511,7 @@ jobs:
# Compress to artifact.001.vvppp,artifact.002.vvppp, ...
(cd "${{ matrix.target }}" && 7z -r a "../compressed.zip")
split -b 1900M --numeric-suffixes=1 -a 3 --additional-suffix .vvppp ./compressed.zip ./${{ steps.vars.outputs.package_name }}.
$split -b 1900M --numeric-suffixes=1 -a 3 --additional-suffix .vvppp ./compressed.zip ./${{ steps.vars.outputs.package_name }}.
# Rename to artifact.vvpp if there are only artifact.001.vvppp
if [ "$(ls ${{ steps.vars.outputs.package_name }}.*.vvppp | wc -l)" == 1 ]; then
Expand Down

0 comments on commit 1ca5623

Please sign in to comment.