Skip to content

Commit

Permalink
fix builder 1.17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Feb 5, 2024
1 parent ba7e886 commit 491978a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
ver:
- { onnx: v1.17.0, ndk: 22.1.7171670 }
- { onnx: v1.17.0, ndk: 26.1.10909125 }
list:
- { arch: armeabi-v7a, min: 19 }
- { arch: arm64-v8a, min: 21 }
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ jobs:
matrix:
os_name: [ubuntu]
ver:
- { onnx: v1.17.0, cmake: 3.28.1, python: 3.8.18, gradle: 8.5, jdk: openjdk-8-jdk }
- { onnx: v1.17.0, cmake: 3.28.2, python: 3.8.18, gradle: 8.5, jdk: openjdk-8-jdk }
list:
- { os_ver: 20.04, os_id: focal }
- { os_ver: 22.04, os_id: jammy }
arch:
[
amd64,
Expand Down
7 changes: 4 additions & 3 deletions build-onnxruntime-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ function pyBuild() {
echo ANDROID_NDK_HOME=$ANDROID_NDK_HOME
python3 $DIR/tools/ci_build/build.py --build_dir $DIR/build-android-$1 \
--config Release \
--build \
--parallel \
--skip_tests \
--build_shared_lib \
Expand All @@ -56,17 +55,19 @@ function pyBuild() {
--cmake_extra_defines CMAKE_INSTALL_PREFIX=./install onnxruntime_BUILD_UNIT_TESTS=OFF

pushd build-android-$1/Release
cmake --build . --config Release -j $NUM_THREADS
collectLibs
popd
}

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sysOS=$(uname -s)
NUM_THREADS=1

if [ $sysOS == "Darwin" ]; then
echo "I'm MacOS"
NUM_THREADS=$(sysctl -n hw.ncpu)
elif [ $sysOS == "Linux" ]; then
echo "I'm Linux"
NUM_THREADS=$(nproc)
else
echo "Other OS: $sysOS"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion build-onnxruntime.bat
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ else (
)
python %~dp0\tools\ci_build\build.py --build_dir %~dp0\build-%~1-%~2-%~3 ^
--config Release ^
--build ^
--parallel ^
--skip_tests ^
--build_shared_lib ^
Expand All @@ -96,6 +95,7 @@ python %~dp0\tools\ci_build\build.py --build_dir %~dp0\build-%~1-%~2-%~3 ^
%VS_FLAG% ^
--cmake_extra_defines CMAKE_INSTALL_PREFIX=./install onnxruntime_BUILD_UNIT_TESTS=OFF
pushd "build-%~1-%~2-%~3"\Release
cmake --build . --config Release -j %NUMBER_OF_PROCESSORS%
call :collectLibs
popd
GOTO:EOF
7 changes: 4 additions & 3 deletions build-onnxruntime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ function collectLibs() {

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
sysOS=$(uname -s)
NUM_THREADS=1

if [ $sysOS == "Darwin" ]; then
echo "I'm MacOS"
NUM_THREADS=$(sysctl -n hw.ncpu)
elif [ $sysOS == "Linux" ]; then
echo "I'm Linux"
NUM_THREADS=$(nproc)
else
echo "Other OS: $sysOS"
exit 0
Expand All @@ -53,13 +54,13 @@ fi
python3 $DIR/tools/ci_build/build.py --build_dir $DIR/build-$sysOS \
--allow_running_as_root \
--config Release \
--build \
--parallel \
--skip_tests \
--build_shared_lib \
--build_java \
--cmake_extra_defines CMAKE_INSTALL_PREFIX=./install onnxruntime_BUILD_UNIT_TESTS=OFF

pushd build-$sysOS/Release
cmake --build . --config Release -j $NUM_THREADS
collectLibs
popd

0 comments on commit 491978a

Please sign in to comment.