Skip to content

Commit

Permalink
ci: macos
Browse files Browse the repository at this point in the history
  • Loading branch information
kibae committed Aug 17, 2024
1 parent 600bd8a commit 9fb83cc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/actions/download-onnxruntime-macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env bash

cd "$(dirname "$0")" || exit

echo
echo "Select onnxruntime version to download:"
RAW_LIST=$(curl -s -H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/microsoft/onnxruntime/releases/latest \
| grep browser_download_url \
| grep -E "onnxruntime-osx-universal([-.0-9]+).tgz" \
| awk '{print $2}' \
| tr -d '"')

item=${RAW_LIST[0]}

FILENAME=$(basename "$item")

echo
echo "Downloading $item"
echo

wget -q "$item"

sudo mkdir -p /usr/local/onnxruntime
sudo tar vzxf "$FILENAME" -C /usr/local/onnxruntime --strip-components=1

rm -f "$FILENAME"

echo
echo "Done"
echo
3 changes: 2 additions & 1 deletion .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
shell: bash
run: |
brew update
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake onnxruntime boost openssl googletest
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake boost openssl googletest
./.github/actions/download-onnxruntime-macos.sh
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
Expand Down

0 comments on commit 9fb83cc

Please sign in to comment.