From aabe99d7e3c4a6c8932f93dd471bef0f647f11bf Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Tue, 23 Jul 2024 00:48:29 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20actionlint=E3=82=92=E5=B0=8E=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/actionlint.yml | 24 ++++++++++++++++++++++++ .github/workflows/build.yml | 31 +++++++++++++++---------------- 2 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/actionlint.yml diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml new file mode 100644 index 0000000..aa4773f --- /dev/null +++ b/.github/workflows/actionlint.yml @@ -0,0 +1,24 @@ +name: actionlint + +on: + - push + - pull_request + +jobs: + actionlint: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Update ShellCheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + shellcheck -V + + - name: actionlint + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + ./actionlint -color diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 841356e..3010bad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,6 @@ name: Build C++ Shared Library on: push: - branches: - # - main release: types: - published @@ -41,11 +39,11 @@ jobs: release_config: Release - artifact_name: onnxruntime-win-x64-gpu os: windows-2022 - cuda_version: 12.2.2 + cuda_version: 12.4.1 # Windowsの場合デフォルトのパッケージ群では不十分であるため、必要そうなパッケージを指定する。ただしいくつかは不要かもしれない cuda_sub_packages: '["cudart", "cuobjdump", "nvcc", "nvdisasm", "thrust", "cublas_dev", "cufft_dev", "curand_dev", "cusolver_dev", "cusparse_dev", "visual_studio_integration"]' - cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.2.26_cuda12-archive.zip - build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_dml --use_cuda --cuda_version 12.2 + cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/windows-x86_64/cudnn-windows-x86_64-8.9.7.29_cuda12-archive.zip + build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Windows CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_dml --use_cuda --cuda_version 12.4 result_dir: build/Release release_config: Release - artifact_name: onnxruntime-win-x86 @@ -60,9 +58,9 @@ jobs: release_config: Release - artifact_name: onnxruntime-linux-x64-gpu os: ubuntu-20.04 - cuda_version: 12.2.2 + cuda_version: 12.4.1 cuda_sub_packages: "[]" # デフォルト - cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.2.26_cuda12-archive.tar.xz + cudnn_url: https://developer.download.nvidia.com/compute/cudnn/redist/cudnn/linux-x86_64/cudnn-linux-x86_64-8.9.7.29_cuda12-archive.tar.xz build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Linux CMAKE_SYSTEM_PROCESSOR=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib --use_cuda result_dir: build release_config: Release @@ -85,12 +83,12 @@ jobs: result_dir: build release_config: Release - artifact_name: onnxruntime-osx-arm64 - os: macos-11 + os: macos-12 build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_OSX_ARCHITECTURES=arm64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build release_config: Release - artifact_name: onnxruntime-osx-x86_64 - os: macos-11 + os: macos-12 build_opts: --cmake_extra_defines CMAKE_SYSTEM_NAME=Darwin CMAKE_OSX_ARCHITECTURES=x86_64 --config Release --parallel --compile_no_warning_as_error --update --build --build_shared_lib result_dir: build release_config: Release @@ -213,7 +211,7 @@ jobs: - name: Set up CUDA if: steps.cache-build-result.outputs.cache-hit != 'true' && matrix.cuda_version && matrix.cudnn_url - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.16 with: cuda: ${{ matrix.cuda_version }} sub-packages: ${{ matrix.cuda_sub_packages }} @@ -297,13 +295,14 @@ jobs: rm -rf ${{ matrix.result_dir }}/${{ matrix.artifact_name }} rm -rf ./artifact # Set library name - if [[ ${{ matrix.artifact_name }} == onnxruntime-win-* ]]; then + ARTIFACT_NAME=${{ matrix.artifact_name }} + if [[ "$ARTIFACT_NAME" == onnxruntime-win-* ]]; then ONNXRUNTIME_NAME=onnxruntime.dll - elif [[ ${{ matrix.artifact_name }} == onnxruntime-linux-* ]]; then + elif [[ "$ARTIFACT_NAME" == onnxruntime-linux-* ]]; then ONNXRUNTIME_NAME=libonnxruntime.so.${{ env.ONNXRUNTIME_VERSION }} - elif [[ ${{ matrix.artifact_name }} == onnxruntime-android-* ]]; then + elif [[ "$ARTIFACT_NAME" == onnxruntime-android-* ]]; then ONNXRUNTIME_NAME=libonnxruntime.so - elif [[ ${{ matrix.artifact_name }} == onnxruntime-osx-* ]] || [[ ${{ matrix.artifact_name }} == onnxruntime-ios-* ]]; then + elif [[ "$ARTIFACT_NAME" == onnxruntime-osx-* ]] || [[ "$ARTIFACT_NAME" == onnxruntime-ios-* ]]; then ONNXRUNTIME_NAME=libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.dylib else echo "Unknown target found : ${{ matrix.artifact_name }}" @@ -342,7 +341,7 @@ jobs: - name: Generate RELEASE_NAME if: env.RELEASE == 'true' run: | - echo "RELEASE_NAME=${{ matrix.artifact_name }}-${{ env.ONNXRUNTIME_VERSION }}" >> $GITHUB_ENV + echo "RELEASE_NAME=${{ matrix.artifact_name }}-${{ env.ONNXRUNTIME_VERSION }}" >> "$GITHUB_ENV" - name: Rearchive artifact if: env.RELEASE == 'true' @@ -364,7 +363,7 @@ jobs: steps: - name: Generate RELEASE_NAME and ONNXRUNTIME_BASENAME run: | - echo "RELEASE_NAME=onnxruntime-ios-xcframework-${{ env.ONNXRUNTIME_VERSION }}" >> $GITHUB_ENV + echo "RELEASE_NAME=onnxruntime-ios-xcframework-${{ env.ONNXRUNTIME_VERSION }}" >> "$GITHUB_ENV" echo "ONNXRUNTIME_BASENAME=libonnxruntime.${{ env.ONNXRUNTIME_VERSION }}.dylib" >> "$GITHUB_ENV" - uses: actions/checkout@v3