]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
ci : Move msvc to matrix (#1318)
authorKai Pastor <redacted>
Sat, 2 Aug 2025 14:29:48 +0000 (16:29 +0200)
committerGitHub <redacted>
Sat, 2 Aug 2025 14:29:48 +0000 (17:29 +0300)
Enable static builds and testing

.github/workflows/ci.yml

index 536a24160b5858ee4aa330643e1fb6758dd7cb99..031cdb09b153eb8c4e286fe2438bdba0e07fc710 100644 (file)
@@ -10,13 +10,14 @@ jobs:
   build:
     strategy:
       matrix:
-        os: [ubuntu-latest, macos-latest, macos-13]
+        os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
         libraries: [shared, static]
 
     runs-on: ${{ matrix.os }}
 
     steps:
-    - uses: actions/checkout@v3
+    - name: Clone
+      uses: actions/checkout@v4
 
     - name: Dependencies for Ubuntu
       if: matrix.os == 'ubuntu-latest'
@@ -24,56 +25,35 @@ jobs:
         sudo apt-get update
         sudo apt-get install llvm
 
+    - name: Add msbuild to PATH
+      if: matrix.os == 'windows-latest'
+      uses: microsoft/setup-msbuild@v2
+
     - name: Create Build Environment
       run: mkdir build
 
     - name: Configure CMake
       working-directory: ./build
       run: cmake ..
-        -G Ninja
-        -DCMAKE_C_COMPILER=clang
-        -DCMAKE_CXX_COMPILER=clang++
+        ${{ contains(matrix.os, 'windows') && '-A x64' || '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' }}
+        ${{ matrix.libraries == 'static' && '-DBUILD_SHARED_LIBS=OFF' || '-DBUILD_SHARED_LIBS=ON' }}
         -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/installed
         -DGGML_METAL=OFF
-        ${{ contains(matrix.libraries, 'static') && '-DBUILD_SHARED_LIBS=OFF' || '-DBUILD_SHARED_LIBS=ON' }}
 
     - name: Build
       working-directory: ./build
-      run: cmake --build .
+      run: cmake --build . ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}
 
     - name: Test
       working-directory: ./build
-      run: ctest --verbose --timeout 900
+      run: ctest --verbose --timeout 900 ${{ contains(matrix.os, 'windows') && '--build-config Release' || '' }}
 
     - name: Install
       working-directory: ./build
-      run: cmake --build . --target install
+      run: cmake --build . --target install ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}
 
     - name: Test CMake config
       run: |
         mkdir test-cmake
-        cmake -S examples/test-cmake -B test-cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed
-        cmake --build test-cmake
-
-  windows:
-    if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' ||
-            github.event.inputs.run_type == 'full-ci' }}
-    runs-on: windows-latest
-
-    steps:
-      - name: Clone
-        uses: actions/checkout@v4
-
-      - name: Add msbuild to PATH
-        uses: microsoft/setup-msbuild@v2
-
-      - name: Configure
-        run: >
-          cmake -S . -B ./build -A x64
-          -DCMAKE_BUILD_TYPE=Release
-          -DBUILD_SHARED_LIBS=ON
-
-      - name: Build
-        run: |
-          cd ./build
-          msbuild ALL_BUILD.vcxproj -t:build -p:configuration=Release -p:platform=x64
+        cmake -S examples/test-cmake -B test-cmake -DCMAKE_PREFIX_PATH=${{ github.workspace }}/installed ${{ contains(matrix.os, 'windows') && '-A x64' || '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' }}
+        cmake --build test-cmake ${{ contains(matrix.os, 'windows') && '--config Release' || '' }}