Skip to content

Commit

Permalink
Remove soversion (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Jul 10, 2024
1 parent 6a6d109 commit b88e7c2
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 10 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/aarch64-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [aarch64]
config: ['Debug', 'MinSizeRel', 'Release', 'RelWithDebInfo']
# config: ['Debug', 'MinSizeRel', 'Release', 'RelWithDebInfo']
config: ['MinSizeRel', 'Release']
# config: ['Release']

steps:
Expand All @@ -49,6 +50,17 @@ jobs:
submodules: true
ref: v${{ env.ONNXRUNTIME_VERSION }}

- name: patch
if: steps.cache-build-result.outputs.cache-hit != 'true'
shell: bash
run: |
sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
sed -i.bak '/onnxruntime PROPERTIES VERSION/d' ./cmake/onnxruntime.cmake
git diff
sudo apt-get install -y patchelf
- name: Build onnxruntime ${{ env.ONNXRUNTIME_VERSION }}
if: steps.cache-build-result.outputs.cache-hit != 'true'
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -90,9 +102,6 @@ jobs:
# cat ./VERSION_NUMBER
# echo "---"
sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
git diff
which python
build_dir=/shared/build-shared
Expand Down Expand Up @@ -143,6 +152,14 @@ jobs:
mv $build_dir/$artifact ./
tree ./$artifact
# ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
patchelf --set-soname libonnxruntime.so ./$artifact/lib/libonnxruntime.so
# ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
zip -r ${artifact}.zip ./$artifact
- name: Upload artifact
Expand Down Expand Up @@ -186,7 +203,7 @@ jobs:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/onnxruntime-libs huggingface
cd huggingface
git lfs pull
# git lfs pull
cp -v ../onnxruntime-linux*.zip ./
git status
git lfs track "*.zip"
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/arm-linux-gnueabihf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
submodules: true
ref: v${{ env.ONNXRUNTIME_VERSION }}


- name: cache-toolchain
id: cache-toolchain
uses: actions/cache@v3
Expand Down Expand Up @@ -131,9 +132,12 @@ jobs:
which python
sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
sed -i.bak '/onnxruntime PROPERTIES VERSION/d' ./cmake/onnxruntime.cmake
git diff
sudo apt-get install -y patchelf
- name: Build onnxruntime for 32-bit ARM
if: steps.cache-build-result.outputs.cache-hit != 'true'
shell: bash
Expand Down Expand Up @@ -184,6 +188,16 @@ jobs:
tree ./onnxruntime-linux-arm-$version/
artifact=onnxruntime-linux-arm-$version
# ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
patchelf --set-soname libonnxruntime.so ./$artifact/lib/libonnxruntime.so
# ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
cp -v ./include/onnxruntime/core/session/onnxruntime_float16.h ./onnxruntime-linux-arm-$version/include
zip -r onnxruntime-linux-arm-${version}.zip ./onnxruntime-linux-arm-$version/
Expand Down Expand Up @@ -216,7 +230,7 @@ jobs:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/onnxruntime-libs huggingface
cd huggingface
git lfs pull
# git lfs pull
cp -v ../onnxruntime-linux-arm-*.zip ./
git status
git lfs track "*.zip"
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/linux-shared.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ jobs:
matrix:
os: [ubuntu-latest]
arch: [x86_64]
config: ['Debug', 'MinSizeRel', 'Release', 'RelWithDebInfo']
# config: ['Debug', 'MinSizeRel', 'Release', 'RelWithDebInfo']
config: ['MinSizeRel', 'Release']


steps:
Expand All @@ -43,6 +44,17 @@ jobs:
submodules: true
ref: v${{ env.ONNXRUNTIME_VERSION }}

- name: patch
if: steps.cache-build-result.outputs.cache-hit != 'true'
shell: bash
run: |
sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
sed -i.bak '/onnxruntime PROPERTIES VERSION/d' ./cmake/onnxruntime.cmake
git diff
sudo apt-get install -y patchelf
- name: Build onnxruntime ${{ env.ONNXRUNTIME_VERSION }}
if: steps.cache-build-result.outputs.cache-hit != 'true'
uses: addnab/docker-run-action@v3
Expand Down Expand Up @@ -75,9 +87,7 @@ jobs:
version=${{ env.ONNXRUNTIME_VERSION }}
which python
sed -i.bak '/SOVERSION/d' ./cmake/onnxruntime.cmake
git diff
build_dir=/shared/build-shared
Expand Down Expand Up @@ -127,6 +137,14 @@ jobs:
mv $build_dir/$artifact ./
tree ./$artifact
ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
patchelf --set-soname libonnxruntime.so ./$artifact/lib/libonnxruntime.so
ldd ./$artifact/lib/libonnxruntime.so
readelf -d ./$artifact/lib/libonnxruntime.so
zip -r ${artifact}.zip ./$artifact
- name: Upload artifact
Expand Down Expand Up @@ -172,7 +190,7 @@ jobs:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/onnxruntime-libs huggingface
cd huggingface
git lfs pull
# git lfs pull
cp -v ../onnxruntime-linux*.zip ./
git status
git lfs track "*.zip"
Expand Down

0 comments on commit b88e7c2

Please sign in to comment.