From dd1d575956e54c5bdc07632f25506b3b1884dbd2 Mon Sep 17 00:00:00 2001 From: Diogo Date: Fri, 8 Sep 2023 12:54:30 -0400 Subject: [PATCH] ci : add Metal build (#514) * metal on mac * remove apt-get * added xcrun prefix --- .github/workflows/ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06ec47f67..4e5c633af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: