Skip to content

Commit

Permalink
chore: actionlintを導入
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Jul 22, 2024
1 parent 34122aa commit aabe99d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 16 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -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
31 changes: 15 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Build C++ Shared Library

on:
push:
branches:
# - main
release:
types:
- published
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/[email protected].15
uses: Jimver/[email protected].16
with:
cuda: ${{ matrix.cuda_version }}
sub-packages: ${{ matrix.cuda_sub_packages }}
Expand Down Expand Up @@ -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 }}"
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit aabe99d

Please sign in to comment.