Skip to content

Commit

Permalink
ci : add Metal build (#514)
Browse files Browse the repository at this point in the history
* metal on mac

* remove apt-get

* added xcrun prefix
  • Loading branch information
dc-dc-dc authored Sep 8, 2023
1 parent e77653a commit dd1d575
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,37 @@ jobs:
llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
test-macos-metal:
runs-on: macos-13
env:
GGML_NLOOP: 3
GGML_NITER: 1
GGML_N_THREADS: 2

steps:
- uses: actions/checkout@v3

- name: Create Build Environment
run: mkdir build

- name: Configure CMake
working-directory: ./build
run: cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DGGML_TEST_COVERAGE=ON -DGGML_METAL=ON ..

- name: Build
working-directory: ./build
run: make

- name: Test
working-directory: ./build
run: ctest --verbose --timeout 900

- name: Test Coverage
working-directory: ./build
run: |
xcrun llvm-profdata merge -sparse tests/*.profraw -o ggml.profdata
xcrun llvm-cov report ./bin/test-grad0 -instr-profile=ggml.profdata
xcrun llvm-cov report ./bin/test-opt -instr-profile=ggml.profdata
build:

Expand Down

0 comments on commit dd1d575

Please sign in to comment.