]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ci : add Metal build (#514)
authorDiogo <redacted>
Fri, 8 Sep 2023 16:54:30 +0000 (12:54 -0400)
committerGitHub <redacted>
Fri, 8 Sep 2023 16:54:30 +0000 (19:54 +0300)
* metal on mac

* remove apt-get

* added xcrun prefix

.github/workflows/ci.yml

index 06ec47f67f8ab2141ee433ac6b33b412c0696e7c..4e5c633af55332fad0135edf5d86243d1cc66e00 100644 (file)
@@ -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: