From 6216400167cb96e95bd2bc66c161eabc4369c52e Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 00:12:22 +0900 Subject: [PATCH 01/15] add iOS build --- .github/workflows/build.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 406d8ef..f1203cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,18 @@ jobs: symlink_workaround: true build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --update --build --build_shared_lib result_dir: build/Linux/Release + - artifact_name: onnxruntime-ios-arm64-cpu + os: macos-12 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 + result_dir: build/iOS/Release + - artifact_name: onnxruntime-ios-sim-arm64-cpu + os: macos-12 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 + result_dir: build/iOS/Release + - artifact_name: onnxruntime-ios-sim-x86_64-cpu + os: macos-12 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 + result_dir: build/iOS/Release env: ONNXRUNTIME_VERSION: v1.14.1 @@ -62,7 +74,7 @@ jobs: key: ${{ matrix.artifact_name }}-${{ env.ONNXRUNTIME_VERSION }}-cache-v1-${{ hashFiles('matrix.json') }} - name: Install build dependencies - if: steps.cache-build-result.outputs.cache-hit != 'true' + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') run: | sudo apt-get update sudo apt-get install -y \ @@ -76,7 +88,7 @@ jobs: # ONNX Runtime v1.14.1 requires CMake 3.24 or higher. - name: Install CMake - if: steps.cache-build-result.outputs.cache-hit != 'true' + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') env: CMAKE_VERSION: 3.24.4 run: | @@ -84,7 +96,7 @@ jobs: sudo bash cmake.sh --skip-license --prefix=/usr/local - name: Configure build environment - if: steps.cache-build-result.outputs.cache-hit != 'true' + if: steps.cache-build-result.outputs.cache-hit != 'true' && startsWith(matrix.os, 'ubuntu') run: | # Required for arm build # https://github.com/microsoft/onnxruntime/issues/4189#issuecomment-642528278 @@ -116,9 +128,9 @@ jobs: # copy shared lib mkdir artifact/lib - NAME=$(basename ${{ matrix.result_dir }}/libonnxruntime.so.*) + NAME=$(basename ${{ matrix.result_dir }}/libonnxruntime.{so.*,dylib}) cp "${{ matrix.result_dir }}/${NAME}" artifact/lib/ - ln -s "${NAME}" artifact/lib/libonnxruntime.so + ln -s "${NAME}" artifact/lib/libonnxruntime.{so,dylib} # copy header files mkdir artifact/include From b8949bcf78a77c7528b7d94b89932ec59932f95c Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 00:14:52 +0900 Subject: [PATCH 02/15] fix underscore --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1203cf..c7d1d30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,15 +33,15 @@ jobs: result_dir: build/Linux/Release - artifact_name: onnxruntime-ios-arm64-cpu os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release - artifact_name: onnxruntime-ios-sim-arm64-cpu os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release - artifact_name: onnxruntime-ios-sim-x86_64-cpu os: macos-12 - build_opts: --config Release --parallel --update --build --build_shared_lib --skip-tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 + build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 result_dir: build/iOS/Release env: From cf69bcd1d55537f87fe37d404dd1721699094ca1 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 00:24:38 +0900 Subject: [PATCH 03/15] add xcode reset process --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7d1d30..64f5683 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,6 +109,10 @@ jobs: sudo ln -s /usr/${{ matrix.arch }}/lib/ld-linux-*.so* /usr/lib/ fi + - name: Prepare Xcode for build iOS target + if: startsWith(matrix.os, 'macos') + run: sudo xcode-select --reset + - name: Build ONNX Runtime if: steps.cache-build-result.outputs.cache-hit != 'true' env: From e4ce18b8d8c9d1f445dde196351f279f2b5b1f6b Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 00:31:42 +0900 Subject: [PATCH 04/15] Revert "add xcode reset process" This reverts commit cf69bcd1d55537f87fe37d404dd1721699094ca1. --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64f5683..c7d1d30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,10 +109,6 @@ jobs: sudo ln -s /usr/${{ matrix.arch }}/lib/ld-linux-*.so* /usr/lib/ fi - - name: Prepare Xcode for build iOS target - if: startsWith(matrix.os, 'macos') - run: sudo xcode-select --reset - - name: Build ONNX Runtime if: steps.cache-build-result.outputs.cache-hit != 'true' env: From 1adc883a48ba5ec0e67090c7e8285bcc07ae9984 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 00:37:09 +0900 Subject: [PATCH 05/15] fix CC / CXX environment variable settings --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7d1d30..2211f63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,12 +108,13 @@ jobs: find /usr/${{ matrix.arch }}/lib -name '*.so*' -exec sudo ln -s {} /usr/lib/${{ matrix.arch }}/ ';' sudo ln -s /usr/${{ matrix.arch }}/lib/ld-linux-*.so* /usr/lib/ fi + + # Set environment variable CC / CXX + echo "CC=${{ env.ARCH_PREFIX }}gcc-${{ matrix.cc_version }}" >> "$GITHUB_ENV" + echo "CXX=${{ env.ARCH_PREFIX }}g++-${{ matrix.cxx_version }}" >> "$GITHUB_ENV" - name: Build ONNX Runtime if: steps.cache-build-result.outputs.cache-hit != 'true' - env: - CC: ${{ env.ARCH_PREFIX }}gcc-${{ matrix.cc_version }} - CXX: ${{ env.ARCH_PREFIX }}g++-${{ matrix.cxx_version }} run: | # add --arm for gcc-8: https://github.com/microsoft/onnxruntime/issues/4189 # skip test: https://github.com/microsoft/onnxruntime/issues/2436 From 72662ab5b99e5bdf580401428ced00d5c0549817 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Fri, 7 Apr 2023 01:32:48 +0900 Subject: [PATCH 06/15] fix copy and link --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2211f63..eb8918b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,8 +130,8 @@ jobs: mkdir artifact/lib NAME=$(basename ${{ matrix.result_dir }}/libonnxruntime.{so.*,dylib}) - cp "${{ matrix.result_dir }}/${NAME}" artifact/lib/ - ln -s "${NAME}" artifact/lib/libonnxruntime.{so,dylib} + cp "${{ matrix.result_dir }}/${NAME}" artifact/lib/ || true + ln -s "${NAME}" artifact/lib/libonnxruntime.{so,dylib} || true # copy header files mkdir artifact/include From 6076a39e37a7207fb88fcac9ff77a2f79a8fa00f Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 00:41:56 +0900 Subject: [PATCH 07/15] change organize import job to script --- .github/workflows/build.yml | 56 +++++++++++++------------------------ 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb8918b..b826555 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,9 @@ jobs: arch: arm-linux-gnueabihf symlink_workaround: true build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --update --build --build_shared_lib - result_dir: build/Linux/Release + result_dir: build/Linux + release_config: Release + library_name: libonnxruntime.so - artifact_name: onnxruntime-linux-arm64-cpu os: ubuntu-20.04 cc_version: '8' @@ -30,19 +32,27 @@ jobs: arch: aarch64-linux-gnu symlink_workaround: true build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --update --build --build_shared_lib - result_dir: build/Linux/Release + result_dir: build/Linux + release_config: Release + library_name: libonnxruntime.so - artifact_name: onnxruntime-ios-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release + release_config: Release-iphoneos + library_name: libonnxruntime.dylib - artifact_name: onnxruntime-ios-sim-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release + release_config: Release-iphonesimulator + library_name: libonnxruntime.dylib - artifact_name: onnxruntime-ios-sim-x86_64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 result_dir: build/iOS/Release + release_config: Release-iphonesimulator + library_name: libonnxruntime.dylib env: ONNXRUNTIME_VERSION: v1.14.1 @@ -123,41 +133,15 @@ jobs: bash ./build.sh ${{ matrix.build_opts }} - name: Organize artifact + shell: bash run: | - mkdir artifact - - # copy shared lib - mkdir artifact/lib - - NAME=$(basename ${{ matrix.result_dir }}/libonnxruntime.{so.*,dylib}) - cp "${{ matrix.result_dir }}/${NAME}" artifact/lib/ || true - ln -s "${NAME}" artifact/lib/libonnxruntime.{so,dylib} || true - - # copy header files - mkdir artifact/include - - readarray -t HEADERS <> ./artifact/GIT_COMMIT_ID + ./tools/ci_build/github/linux/copy_strip_binary.sh \ + -r ${{ matrix.result_dir }} \ + -a ${{ matrix.artifact_name }} \ + -l ${{ matrix.library_name }} \ + -c ${{ matrix.release_config }} \ + -s "$(pwd)" \ + -t "$(git rev-parse HEAD)" - name: Upload artifact uses: actions/upload-artifact@v2 From 4844b80c85dd54fcecdfd347bdc5602a7b2176c4 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 01:41:28 +0900 Subject: [PATCH 08/15] fix library name setting --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b826555..49ac932 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --update --build --build_shared_lib result_dir: build/Linux release_config: Release - library_name: libonnxruntime.so + library_extension: so - artifact_name: onnxruntime-linux-arm64-cpu os: ubuntu-20.04 cc_version: '8' @@ -34,25 +34,25 @@ jobs: build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --update --build --build_shared_lib result_dir: build/Linux release_config: Release - library_name: libonnxruntime.so + library_extension: so - artifact_name: onnxruntime-ios-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphoneos - library_name: libonnxruntime.dylib + library_extension: dylib - artifact_name: onnxruntime-ios-sim-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphonesimulator - library_name: libonnxruntime.dylib + library_extension: dylib - artifact_name: onnxruntime-ios-sim-x86_64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphonesimulator - library_name: libonnxruntime.dylib + library_extension: dylib env: ONNXRUNTIME_VERSION: v1.14.1 @@ -138,7 +138,7 @@ jobs: ./tools/ci_build/github/linux/copy_strip_binary.sh \ -r ${{ matrix.result_dir }} \ -a ${{ matrix.artifact_name }} \ - -l ${{ matrix.library_name }} \ + -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.${{ matrix.library_extension }} \ -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" From 03e018c2a0ec2605cb17bb1df920ee647d76bbf5 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 02:43:30 +0900 Subject: [PATCH 09/15] fix version specification --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49ac932..3c68062 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,7 +138,7 @@ jobs: ./tools/ci_build/github/linux/copy_strip_binary.sh \ -r ${{ matrix.result_dir }} \ -a ${{ matrix.artifact_name }} \ - -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.${{ matrix.library_extension }} \ + -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION:1 }}.${{ matrix.library_extension }} \ -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" From a1b45142e5859d7091bb2cca3de2116e50ebc39c Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 02:54:23 +0900 Subject: [PATCH 10/15] Revert "fix version specification" This reverts commit 03e018c2a0ec2605cb17bb1df920ee647d76bbf5. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3c68062..49ac932 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,7 +138,7 @@ jobs: ./tools/ci_build/github/linux/copy_strip_binary.sh \ -r ${{ matrix.result_dir }} \ -a ${{ matrix.artifact_name }} \ - -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION:1 }}.${{ matrix.library_extension }} \ + -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.${{ matrix.library_extension }} \ -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" From 47ea97efe569bae4f3bc8a66a7d960c7d362986d Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 02:56:10 +0900 Subject: [PATCH 11/15] add workaround for version specification --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49ac932..3b7f15d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -135,10 +135,13 @@ jobs: - name: Organize artifact shell: bash run: | + # バージョンにはvが必要ないので取り除く + ONNXRUNTIME_VERSION=${{ env.ONNXRUNTIME_VERSION }} + ONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION:1} ./tools/ci_build/github/linux/copy_strip_binary.sh \ -r ${{ matrix.result_dir }} \ -a ${{ matrix.artifact_name }} \ - -l libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.${{ matrix.library_extension }} \ + -l "libonnxruntime.$ONNXRUNTIME_VERSION.${{ matrix.library_extension }}" \ -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" From c994efd49fc500753643cd1b016941a649ffa392 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 12:12:52 +0900 Subject: [PATCH 12/15] fix for linux library name --- .github/workflows/build.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3b7f15d..2bb2893 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,6 @@ jobs: build_opts: --arm --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=armv7l --config Release --parallel --update --build --build_shared_lib result_dir: build/Linux release_config: Release - library_extension: so - artifact_name: onnxruntime-linux-arm64-cpu os: ubuntu-20.04 cc_version: '8' @@ -34,25 +33,21 @@ jobs: build_opts: --arm64 --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=aarch64 --config Release --parallel --update --build --build_shared_lib result_dir: build/Linux release_config: Release - library_extension: so - artifact_name: onnxruntime-ios-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphoneos --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphoneos - library_extension: dylib - artifact_name: onnxruntime-ios-sim-arm64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch arm64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphonesimulator - library_extension: dylib - artifact_name: onnxruntime-ios-sim-x86_64-cpu os: macos-12 build_opts: --config Release --parallel --update --build --build_shared_lib --skip_tests --use_xcode --ios --ios_sysroot iphonesimulator --osx_arch x86_64 --apple_deploy_target 16.0 result_dir: build/iOS/Release release_config: Release-iphonesimulator - library_extension: dylib env: ONNXRUNTIME_VERSION: v1.14.1 @@ -131,17 +126,26 @@ jobs: # ONNX Runtime v1.9.0 requires CMAKE_SYSTEM_PROCESSOR, https://github.com/microsoft/onnxruntime/releases/tag/v1.9.0 # Both CMAKE_SYSTEM_NAME and CMAKE_SYSTEM_PROCESSOR are required. bash ./build.sh ${{ matrix.build_opts }} - + - name: Organize artifact shell: bash run: | # バージョンにはvが必要ないので取り除く ONNXRUNTIME_VERSION=${{ env.ONNXRUNTIME_VERSION }} ONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION:1} + # Set library name + if [[ ${{ matrix.artifact_name }} == onnxruntime-linux-* ]]; then + ONNXRUNTIME_NAME=libonnxruntime.so.$ONNXRUNTIME_VERSION + elif [[ ${{ matrix.artifact_name }} == onnxruntime-ios-* ]]; then + ONNXRUNTIME_NAME=libonnxruntime.$ONNXRUNTIME_VERSION.dylib + else + echo "Unknown target found : ${{ matrix.artifact_name }}" + return 1 + fi ./tools/ci_build/github/linux/copy_strip_binary.sh \ -r ${{ matrix.result_dir }} \ -a ${{ matrix.artifact_name }} \ - -l "libonnxruntime.$ONNXRUNTIME_VERSION.${{ matrix.library_extension }}" \ + -l $ONNXRUNTIME_NAME \ -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" From 72704c2a71d29c5b946a88219b5c3de3cb19ac48 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 23:30:36 +0900 Subject: [PATCH 13/15] move artifact --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bb2893..80365f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -149,6 +149,7 @@ jobs: -c ${{ matrix.release_config }} \ -s "$(pwd)" \ -t "$(git rev-parse HEAD)" + mv ${{ matrix.result_dir }}/${{ matrix.artifact_name }} ./artifact/ - name: Upload artifact uses: actions/upload-artifact@v2 From 52f3de6211dbfdafdc534efb8203c509dece5973 Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sat, 8 Apr 2023 23:37:36 +0900 Subject: [PATCH 14/15] add remove process --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 80365f4..8394368 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,6 +130,9 @@ jobs: - name: Organize artifact shell: bash run: | + # コピー先artifactを予め削除しておく + rm -r ${{ matrix.result_dir }}/${{ matrix.artifact_name }} || true + rm -r ./artifact || true # バージョンにはvが必要ないので取り除く ONNXRUNTIME_VERSION=${{ env.ONNXRUNTIME_VERSION }} ONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION:1} From 59adfbc44daba38084fa8e677d4b1022620768be Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Sun, 9 Apr 2023 12:26:20 +0900 Subject: [PATCH 15/15] add forcibly option to rm --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8394368..aa18b56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -131,8 +131,8 @@ jobs: shell: bash run: | # コピー先artifactを予め削除しておく - rm -r ${{ matrix.result_dir }}/${{ matrix.artifact_name }} || true - rm -r ./artifact || true + rm -rf ${{ matrix.result_dir }}/${{ matrix.artifact_name }} + rm -rf ./artifact # バージョンにはvが必要ないので取り除く ONNXRUNTIME_VERSION=${{ env.ONNXRUNTIME_VERSION }} ONNXRUNTIME_VERSION=${ONNXRUNTIME_VERSION:1}