Skip to content

Commit

Permalink
fix musl-gcc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminwan committed Jul 17, 2024
1 parent d1a2817 commit c02124f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
47 changes: 41 additions & 6 deletions .github/workflows/musl-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,47 @@ jobs:
x86_64-linux-musl,
x86_64-linux-muslx32,
]

name: musl-${{ matrix.arch }}
exclude:
- arch: aarch64_be-linux-musl #error: static assertion failed: ORT format only supports little-endian machines
- arch: armeb-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armeb-linux-musleabihf #error: static assertion failed: ORT format only supports little-endian machines
- arch: armel-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armel-linux-musleabihf #error: static assertion failed
- arch: arm-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: arm-linux-musleabihf #error: static assertion failed
- arch: armv5l-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armv5l-linux-musleabihf #error: static assertion failed
- arch: armv5te-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armv6-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armv6-linux-musleabihf #error: static assertion failed
- arch: armv7-linux-musleabi #error: ‘MLAS_FLOAT32X4’ does not name a type
- arch: armv7-linux-musleabihf #error: static assertion failed
- arch: armv7l-linux-musleabihf #error: static assertion failed
- arch: armv7m-linux-musleabi #error: ‘MLAS_FLOAT32X4’ was not declared in this scope
- arch: armv7r-linux-musleabihf #error: static assertion failed
- arch: i486-linux-musl #error: SSE vector return without SSE enabled changes the ABI
- arch: i586-linux-musl #error: SSE vector return without SSE enabled changes the ABI
- arch: i686-linux-musl #error: SSE vector return without SSE enabled changes the ABI
- arch: m68k-linux-musl #error: static assertion failed
- arch: microblazeel-linux-musl #error: static assertion failed: Platform is not 64-bit
- arch: microblaze-linux-musl #error: static assertion failed: ORT format only supports little-endian machines
- arch: mips64el-linux-musln32 #error: static assertion failed: Platform is not 64-bit
- arch: mips64el-linux-musln32sf #error: static assertion failed: Platform is not 64-bit
- arch: mips64-linux-musl #error: static assertion failed: ORT format only supports little-endian machines
- arch: mips64-linux-musln32 #error: static assertion failed: ORT format only supports little-endian machines
- arch: mips64-linux-musln32sf #error: static assertion failed: ORT format only supports little-endian machines
- arch: powerpc64le-linux-musl #error: there are no arguments to ‘vec_splat’ that depend on a template parameter, so a declaration of ‘vec_splat’ must be available
- arch: powerpc64-linux-musl #error: there are no arguments to ‘vec_splat’ that depend on a template parameter, so a declaration of ‘vec_splat’ must be available
- arch: powerpcle-linux-musl #error: GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee
- arch: powerpcle-linux-muslsf #error: GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee
- arch: powerpc-linux-musl #error: GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee
- arch: powerpc-linux-muslsf #error: GCC vector returned by reference: non-standard ABI extension with no compatibility guarantee

name: ${{ matrix.arch }}

env:
BUILD_SCRIPT: build-onnxruntime-musl.sh
BUILD_OPTIONS: onnxruntime_options.txt
BUILD_OPTIONS: onnxruntime_cmake_options.txt
SHARED_PKG_NAME: onnxruntime-${{ matrix.ver.onnx }}-${{ matrix.arch }}-shared
STATIC_PKG_NAME: onnxruntime-${{ matrix.ver.onnx }}-${{ matrix.arch }}-static

Expand Down Expand Up @@ -116,18 +151,18 @@ jobs:
run: |
cd onnxruntime-${{ matrix.ver.onnx }}
chmod a+x ${{ env.BUILD_SCRIPT }}
./${{ env.BUILD_SCRIPT }} -t '${{ matrix.arch }}' -p '/opt/${{ matrix.arch }}'
./${{ env.BUILD_SCRIPT }} -n '${{ matrix.arch }}' -p '/opt/${{ matrix.arch }}'
# install文件夹改名linux,并使用7z压缩
- name: 7zip shared lib
run: |
cp -r onnxruntime-${{ matrix.ver.onnx }}/build-Linux/install linux
cp -r onnxruntime-${{ matrix.ver.onnx }}/build-Release-${{ matrix.arch }}/install linux
7z a ${{ env.SHARED_PKG_NAME }}.7z linux
rm -r -f linux
- name: 7zip static lib
run: |
cp -r onnxruntime-${{ matrix.ver.onnx }}/build-Linux/install-static linux
cp -r onnxruntime-${{ matrix.ver.onnx }}/build-Release-${{ matrix.arch }}/install-static linux
7z a ${{ env.STATIC_PKG_NAME }}.7z linux
rm -r -f linux
Expand Down
10 changes: 5 additions & 5 deletions build-onnxruntime-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,14 @@ else
exit 0
fi

while getopts "t:p:" arg; do
while getopts "n:p:" arg; do
case $arg in
t)
echo "t's arg:$OPTARG"
n)
echo "n's arg:$OPTARG"
export TOOLCHAIN_NAME="$OPTARG"
;;
p)
echo "t's arg:$OPTARG"
echo "p's arg:$OPTARG"
export TOOLCHAIN_PATH="$OPTARG"
;;
?)
Expand All @@ -128,7 +128,7 @@ echo "TOOLCHAIN_NAME=$TOOLCHAIN_NAME, TOOLCHAIN_PATH=$TOOLCHAIN_PATH"

if [ -z "$TOOLCHAIN_NAME" ] || [ -z "$TOOLCHAIN_PATH" ]; then
echo -e "empty TOOLCHAIN_NAME or TOOLCHAIN_PATH."
echo -e "usage: ./build-onnxruntime-musl.sh -t 'aarch64-linux-musl' -p '/opt/aarch64-linux-musl'"
echo -e "usage: ./build-onnxruntime-musl.sh -n 'aarch64-linux-musl' -p '/opt/aarch64-linux-musl'"
exit 1
fi

Expand Down

0 comments on commit c02124f

Please sign in to comment.