Skip to content

Commit

Permalink
--build_apple_frameworkを加えてみる
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Oct 1, 2024
1 parent f58c8d1 commit 44071d3
Showing 1 changed file with 140 additions and 134 deletions.
274 changes: 140 additions & 134 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,146 +38,147 @@ jobs:
matrix:
# TODO: 外せる`--compile_no_warning_as_error`は外す
include:
- artifact_name: onnxruntime-win-x64
os: windows-2022
build_opts: |-
--compile_no_warning_as_error
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Windows
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x64-dml
os: windows-2022
build_opts: |-
--compile_no_warning_as_error
--use_dml
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Windows
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x64-cuda
os: windows-2022
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.7.29_cuda12-archive.zip
build_opts: |-
--compile_no_warning_as_error
--use_cuda
--cuda_version 12.4 # WindowsではCUDAのディレクトリを見つけ出すのに必要(1.16.3時点)
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Windows
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-win-x86
os: windows-2022
build_opts: |-
--compile_no_warning_as_error
--x86
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Windows
CMAKE_SYSTEM_PROCESSOR=x86
result_dir: build/Release
release_config: Release
- artifact_name: onnxruntime-linux-x64
os: ubuntu-20.04
build_opts: |-
--compile_no_warning_as_error
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Linux
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-linux-x64-cuda
os: ubuntu-20.04
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.7.29_cuda12-archive.tar.xz
build_opts: |-
--compile_no_warning_as_error
--use_cuda
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Linux
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-linux-armhf
os: ubuntu-20.04
cc_version: "10"
cxx_version: "10"
linux_cross_arch: arm-linux-gnueabihf
symlink_workaround: true
build_opts: |-
--compile_no_warning_as_error
--arm
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Linux
CMAKE_SYSTEM_PROCESSOR=armv7l
result_dir: build
release_config: Release
- artifact_name: onnxruntime-linux-arm64
os: ubuntu-20.04
cc_version: "10"
cxx_version: "10"
linux_cross_arch: aarch64-linux-gnu
symlink_workaround: true
build_opts: |-
--compile_no_warning_as_error
--arm64
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Linux
CMAKE_SYSTEM_PROCESSOR=aarch64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-osx-arm64
os: macos-12
build_opts: |-
--compile_no_warning_as_error
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Darwin
CMAKE_OSX_ARCHITECTURES=arm64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-osx-x86_64
os: macos-12
build_opts: |-
--compile_no_warning_as_error
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Darwin
CMAKE_OSX_ARCHITECTURES=x86_64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-android-x64
os: ubuntu-20.04
build_opts: |-
--compile_no_warning_as_error
--android
--android_abi x86_64
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Android
CMAKE_SYSTEM_PROCESSOR=x86_64
result_dir: build
release_config: Release
- artifact_name: onnxruntime-android-arm64
os: ubuntu-20.04
build_opts: |-
--compile_no_warning_as_error
--android
--android_abi arm64-v8a
--cmake_extra_defines
CMAKE_SYSTEM_NAME=Android
CMAKE_SYSTEM_PROCESSOR=aarch64
result_dir: build
release_config: Release
#- artifact_name: onnxruntime-win-x64
# os: windows-2022
# build_opts: |-
# --compile_no_warning_as_error
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Windows
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build/Release
# release_config: Release
#- artifact_name: onnxruntime-win-x64-dml
# os: windows-2022
# build_opts: |-
# --compile_no_warning_as_error
# --use_dml
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Windows
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build/Release
# release_config: Release
#- artifact_name: onnxruntime-win-x64-cuda
# os: windows-2022
# 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.7.29_cuda12-archive.zip
# build_opts: |-
# --compile_no_warning_as_error
# --use_cuda
# --cuda_version 12.4 # WindowsではCUDAのディレクトリを見つけ出すのに必要(1.16.3時点)
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Windows
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build/Release
# release_config: Release
#- artifact_name: onnxruntime-win-x86
# os: windows-2022
# build_opts: |-
# --compile_no_warning_as_error
# --x86
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Windows
# CMAKE_SYSTEM_PROCESSOR=x86
# result_dir: build/Release
# release_config: Release
#- artifact_name: onnxruntime-linux-x64
# os: ubuntu-20.04
# build_opts: |-
# --compile_no_warning_as_error
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Linux
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-linux-x64-cuda
# os: ubuntu-20.04
# 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.7.29_cuda12-archive.tar.xz
# build_opts: |-
# --compile_no_warning_as_error
# --use_cuda
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Linux
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-linux-armhf
# os: ubuntu-20.04
# cc_version: "10"
# cxx_version: "10"
# linux_cross_arch: arm-linux-gnueabihf
# symlink_workaround: true
# build_opts: |-
# --compile_no_warning_as_error
# --arm
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Linux
# CMAKE_SYSTEM_PROCESSOR=armv7l
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-linux-arm64
# os: ubuntu-20.04
# cc_version: "10"
# cxx_version: "10"
# linux_cross_arch: aarch64-linux-gnu
# symlink_workaround: true
# build_opts: |-
# --compile_no_warning_as_error
# --arm64
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Linux
# CMAKE_SYSTEM_PROCESSOR=aarch64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-osx-arm64
# os: macos-12
# build_opts: |-
# --compile_no_warning_as_error
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Darwin
# CMAKE_OSX_ARCHITECTURES=arm64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-osx-x86_64
# os: macos-12
# build_opts: |-
# --compile_no_warning_as_error
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Darwin
# CMAKE_OSX_ARCHITECTURES=x86_64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-android-x64
# os: ubuntu-20.04
# build_opts: |-
# --compile_no_warning_as_error
# --android
# --android_abi x86_64
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Android
# CMAKE_SYSTEM_PROCESSOR=x86_64
# result_dir: build
# release_config: Release
#- artifact_name: onnxruntime-android-arm64
# os: ubuntu-20.04
# build_opts: |-
# --compile_no_warning_as_error
# --android
# --android_abi arm64-v8a
# --cmake_extra_defines
# CMAKE_SYSTEM_NAME=Android
# CMAKE_SYSTEM_PROCESSOR=aarch64
# result_dir: build
# release_config: Release
- artifact_name: onnxruntime-ios-arm64
os: macos-12
build_opts: |-
--compile_no_warning_as_error
--skip_tests
--use_xcode
--build_apple_framework
--ios
--apple_sysroot iphoneos
--osx_arch arm64
Expand All @@ -191,6 +192,7 @@ jobs:
--compile_no_warning_as_error
--skip_tests
--use_xcode
--build_apple_framework
--ios
--apple_sysroot iphonesimulator
--osx_arch arm64
Expand All @@ -204,6 +206,7 @@ jobs:
--compile_no_warning_as_error
--skip_tests
--use_xcode
--build_apple_framework
--ios
--apple_sysroot iphonesimulator
--osx_arch x86_64
Expand Down Expand Up @@ -403,6 +406,9 @@ jobs:
- name: Organize artifact
run: |
file ${{ matrix.result_dir }}/${{ matrix.release_config }}/onnxruntime.framework/onnxruntime
cat ${{ matrix.result_dir }}/${{ matrix.release_config }}/onnxruntime.framework/Info.plist
# コピー先artifactを予め削除しておく
rm -rf ${{ matrix.result_dir }}/${{ matrix.artifact_name }}
rm -rf ./artifact
Expand Down

0 comments on commit 44071d3

Please sign in to comment.