Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build.ymlでGNU版のsedとsplitをenvに入れて明示的に実行 #702

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: ${{ startsWith(matrix.os, 'macos-') && 'gsed' || 'sed' }}
split: ${{ startsWith(matrix.os, 'macos-') && '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