Skip to content

Commit

Permalink
macos
Browse files Browse the repository at this point in the history
  • Loading branch information
danemadsen committed Jul 29, 2024
1 parent 0a84db4 commit 05f3a1f
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,15 @@ jobs:
- name: Update CMake
run: brew install cmake

- name: Download ONNX Runtime
run: |
if [ "${{ matrix.arch }}" == "x86_64" ]; then
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-osx-x86_64-static_lib-1.18.1.tgz -O onnxruntime.tgz
else
wget https://github.com/supertone-inc/onnxruntime-build/releases/download/v1.18.1/onnxruntime-osx-arm64-static_lib-1.18.1.tgz -O onnxruntime.tgz
fi
mkdir -p onnxruntime
tar -xzf onnxruntime.tgz -C onnxruntime --strip-components 1
mkdir -p lib
rsync -a onnxruntime/lib/ lib/
- name: Determine CPU Cores
id: cpu-info
run: echo "CPU_CORES=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV

- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DONNXRUNTIME_DIR=${PWD}/onnxruntime
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}

- name: Build
run: cmake --build build --config Release
run: cmake --build build --config Release -- -j${{ env.CPU_CORES }}

- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 05f3a1f

Please sign in to comment.