Skip to content

Commit 686c298

Browse files
committed
fix(ci): use glob path for macOS ONNX Runtime dylib copy
BSD tar on macOS runners does not strip the nested directory with --strip-components=1 the same way GNU tar does. Skip stripping for darwin and use a glob pattern to find the dylib inside the versioned directory name.
1 parent ed85b1d commit 686c298

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/nightly-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/${ARCHIVE}"
111111
curl -fsSL "$URL" -o /tmp/onnxruntime.tgz
112112
mkdir -p /tmp/onnxruntime
113-
tar -xzf /tmp/onnxruntime.tgz -C /tmp/onnxruntime --strip-components=1
113+
tar -xzf /tmp/onnxruntime.tgz -C /tmp/onnxruntime
114114
;;
115115
esac
116116
@@ -167,7 +167,7 @@ jobs:
167167
cp /tmp/onnxruntime/onnxruntime-win-x64-*/lib/*.dll artifacts/
168168
elif [ "${{ matrix.goos }}" = "darwin" ]; then
169169
cp /opt/homebrew/lib/libtensorflowlite_c.dylib artifacts/
170-
cp /tmp/onnxruntime/lib/libonnxruntime.dylib artifacts/
170+
cp /tmp/onnxruntime/onnxruntime-osx-arm64-*/lib/libonnxruntime.dylib artifacts/
171171
fi
172172
173173
# Create tarball

.github/workflows/release-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
URL="https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/${ARCHIVE}"
9999
curl -fsSL "$URL" -o /tmp/onnxruntime.tgz
100100
mkdir -p /tmp/onnxruntime
101-
tar -xzf /tmp/onnxruntime.tgz -C /tmp/onnxruntime --strip-components=1
101+
tar -xzf /tmp/onnxruntime.tgz -C /tmp/onnxruntime
102102
;;
103103
esac
104104
@@ -159,7 +159,7 @@ jobs:
159159
cp /tmp/onnxruntime/onnxruntime-win-x64-*/lib/*.dll artifacts/
160160
elif [ "${{ matrix.goos }}" = "darwin" ]; then
161161
cp /opt/homebrew/lib/libtensorflowlite_c.dylib artifacts/
162-
cp /tmp/onnxruntime/lib/libonnxruntime.dylib artifacts/
162+
cp /tmp/onnxruntime/onnxruntime-osx-arm64-*/lib/libonnxruntime.dylib artifacts/
163163
fi
164164
165165
# Create tarball

0 commit comments

Comments
 (0)