From 9fb83cc12381bc51b375382b9196464432e2fa4d Mon Sep 17 00:00:00 2001 From: Kibae Shin Date: Sat, 17 Aug 2024 16:02:46 +0900 Subject: [PATCH 1/3] ci: macos --- .github/actions/download-onnxruntime-macos.sh | 32 +++++++++++++++++++ .github/workflows/cmake-macos.yml | 3 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 .github/actions/download-onnxruntime-macos.sh diff --git a/.github/actions/download-onnxruntime-macos.sh b/.github/actions/download-onnxruntime-macos.sh new file mode 100755 index 0000000..ea08e69 --- /dev/null +++ b/.github/actions/download-onnxruntime-macos.sh @@ -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 diff --git a/.github/workflows/cmake-macos.yml b/.github/workflows/cmake-macos.yml index 8a52638..cb6d1b1 100644 --- a/.github/workflows/cmake-macos.yml +++ b/.github/workflows/cmake-macos.yml @@ -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. From 5ea06809e972ba9c1c6649c93e80ab73f1113776 Mon Sep 17 00:00:00 2001 From: Kibae Shin Date: Sat, 17 Aug 2024 16:06:01 +0900 Subject: [PATCH 2/3] ci: macos --- .github/workflows/cmake-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-macos.yml b/.github/workflows/cmake-macos.yml index cb6d1b1..e6a78dc 100644 --- a/.github/workflows/cmake-macos.yml +++ b/.github/workflows/cmake-macos.yml @@ -31,7 +31,7 @@ jobs: shell: bash run: | brew update - HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake boost openssl googletest + HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake boost openssl googletest curl ./.github/actions/download-onnxruntime-macos.sh - name: Set reusable strings From 15db546879669c8447d12c4b7120cc6f2c1e0a7a Mon Sep 17 00:00:00 2001 From: Kibae Shin Date: Sat, 17 Aug 2024 16:12:39 +0900 Subject: [PATCH 3/3] ci: macos --- .github/actions/download-onnxruntime-macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/download-onnxruntime-macos.sh b/.github/actions/download-onnxruntime-macos.sh index ea08e69..42680ef 100755 --- a/.github/actions/download-onnxruntime-macos.sh +++ b/.github/actions/download-onnxruntime-macos.sh @@ -8,7 +8,7 @@ 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" \ + | grep "onnxruntime-osx-universal" \ | awk '{print $2}' \ | tr -d '"')