Skip to content

Commit

Permalink
statics
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Jul 28, 2024
1 parent af1e6e8 commit f7c9e23
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, arm64]
arch: [x86_64, aarch64]

steps:
- name: Checkout
Expand All @@ -28,12 +28,12 @@ jobs:
- name: Download ONNX Runtime
run: |
if [ "${{ matrix.arch }}" == "x86_64" ]; then
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-linux-x64-static_lib-1.18.1-glibc2_17.zip -O onnxruntime.zip
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-linux-x64-static_lib-1.18.1.tgz -O onnxruntime.zip
else
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-linux-aarch64-static_lib-1.18.1-glibc2_17.zip -O onnxruntime.zip
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-linux-aarch64-static_lib-1.18.1.tgz -O onnxruntime.zip
fi
mkdir -p onnxruntime
unzip onnxruntime.zip -d onnxruntime-temp
tar -xzf onnxruntime.zip -C onnxruntime-temp --strip-components 1
mv onnxruntime-temp/*/* onnxruntime
rm -rf onnxruntime-temp
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ jobs:
- name: Download ONNX Runtime
run: |
if [ "${{ matrix.arch }}" == "x86_64" ]; then
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-osx-x86_64-static_lib-1.18.1.zip -O onnxruntime.zip
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-osx-x86_64-static_lib-1.18.1.tgz -O onnxruntime.tgz
else
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v1.18.1/onnxruntime-osx-arm64-static_lib-1.18.1.zip -O onnxruntime.zip
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-osx-arm64-static_lib-1.18.1.tgz -O onnxruntime.tgz
fi
mkdir -p onnxruntime
tar -xzf onnxruntime.zip -C onnxruntime --strip-components 1
tar -xzf onnxruntime.tgz -C onnxruntime --strip-components 1
mkdir -p lib
rsync -a onnxruntime/lib/ lib/
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if(NOT DEFINED ONNXRUNTIME_DIR)
if(WIN32)
# Windows x86-64
set(ONNXRUNTIME_PREFIX "onnxruntime-win-x64-static_lib-${ONNXRUNTIME_VERSION}")
set(ONNXRUNTIME_EXT "tar.bz2")
set(ONNXRUNTIME_EXT "zip")
elseif (APPLE)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
# MacOS x86-64
Expand All @@ -57,23 +57,23 @@ if(NOT DEFINED ONNXRUNTIME_DIR)
message(FATAL_ERROR "Unsupported architecture for onnxruntime")
endif()

set(ONNXRUNTIME_EXT "zip")
set(ONNXRUNTIME_EXT "tgz")
else()
if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64)
# Linux x86-64
set(ONNXRUNTIME_PREFIX "onnxruntime-linux-x64-static_lib-${ONNXRUNTIME_VERSION}-glibc2_17")
set(ONNXRUNTIME_PREFIX "onnxruntime-linux-x64-static_lib-${ONNXRUNTIME_VERSION}")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
# Linux ARM 64-bit
set(ONNXRUNTIME_PREFIX "onnxruntime-linux-aarch64-static_lib-1.18.0-glibc2_17")
set(ONNXRUNTIME_PREFIX "onnxruntime-linux-aarch64-static_lib-${ONNXRUNTIME_VERSION}")
else()
message(FATAL_ERROR "Unsupported architecture for onnxruntime")
endif()

set(ONNXRUNTIME_EXT "zip")
set(ONNXRUNTIME_EXT "tgz")
endif()

if(NOT DEFINED ONNXRUNTIME_URL)
set(ONNXRUNTIME_URL "https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${ONNXRUNTIME_VERSION}/${ONNXRUNTIME_PREFIX}.${ONNXRUNTIME_EXT}")
set(ONNXRUNTIME_URL "https://github.com/supertone-inc/onnxruntime-build/releases/download/v${ONNXRUNTIME_VERSION}/${ONNXRUNTIME_PREFIX}.${ONNXRUNTIME_EXT}")
endif()

set(DOWNLOAD_DIR "${CMAKE_CURRENT_LIST_DIR}/download")
Expand Down

0 comments on commit f7c9e23

Please sign in to comment.