From 552a900c9e34f2d300d6c54346cc6ab177641a18 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Wed, 21 Jun 2023 05:43:31 +0900 Subject: [PATCH] =?UTF-8?q?Github=20Actions=E3=81=A7shell:=20bash=E3=82=92?= =?UTF-8?q?=E6=AF=8E=E5=9B=9E=E6=9B=B8=E3=81=8B=E3=81=AA=E3=81=8F=E3=81=A6?= =?UTF-8?q?=E3=82=82=E8=89=AF=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=81=99?= =?UTF-8?q?=E3=82=8B=20(#21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2dcb591..33af2a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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 @@ -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 }} @@ -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 \ @@ -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"