Skip to content

Commit

Permalink
Github Actionsでshell: bashを毎回書かなくても良いようにする (VOICEVOX#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba authored Jun 20, 2023
1 parent 2a8c1a3 commit 552a900
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ env:
|- # releaseタグ名か、workflow_dispatchでのreleaseフラグがあればリリースする
${{ github.event.release.tag_name != '' || github.event.inputs.release == 'true' }}

defaults:
run:
shell: bash

jobs:
build-onnxruntime:
strategy:
Expand Down Expand Up @@ -74,7 +78,6 @@ jobs:

steps:
- name: Version check (semver)
shell: bash
run: |
VERSION="${{ env.ONNXRUNTIME_VERSION }}"
if [[ $VERSION =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$ ]]; then
Expand Down Expand Up @@ -153,7 +156,6 @@ jobs:
bash ./build.sh ${{ matrix.build_opts }}
- name: Organize artifact
shell: bash
run: |
# コピー先artifactを予め削除しておく
rm -rf ${{ matrix.result_dir }}/${{ matrix.artifact_name }}
Expand Down Expand Up @@ -227,20 +229,17 @@ jobs:
path: artifact/onnxruntime-x86_64-apple-ios

- name: Remove no version notation dylib
shell: bash
run: |
rm -f artifact/onnxruntime-x86_64-apple-ios/lib/*onnxruntime.dylib
rm -f artifact/onnxruntime-aarch64-apple-ios-sim/lib/*onnxruntime.dylib
rm -f artifact/onnxruntime-aarch64-apple-ios/lib/*onnxruntime.dylib
- name: Create fat binary
shell: bash
run: |
mkdir -p "artifact/onnxruntime-sim"
lipo -create "artifact/onnxruntime-x86_64-apple-ios/lib/${{ env.ONNXRUNTIME_BASENAME }}" "artifact/onnxruntime-aarch64-apple-ios-sim/lib/${{ env.ONNXRUNTIME_BASENAME }}" -output "artifact/onnxruntime-sim/${{ env.ONNXRUNTIME_BASENAME }}"
- name: Create XCFramework
shell: bash
run: |
mkdir -p "artifact/${{ env.ONNXRUNTIME_BASENAME }}"
xcodebuild -create-xcframework \
Expand All @@ -249,7 +248,6 @@ jobs:
-output "artifact/${{ env.ONNXRUNTIME_BASENAME }}/onnxruntime.xcframework"
- name: Archive artifact
shell: bash
run: |
cd artifact/${{ env.ONNXRUNTIME_BASENAME }}
7z a "../../${{ env.RELEASE_NAME }}.zip" "onnxruntime.xcframework"
Expand Down

0 comments on commit 552a900

Please sign in to comment.