]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Expand codeql testing to run on multiple platforms and two configs. codeql 2214/head
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Mon, 9 Mar 2026 13:09:14 +0000 (14:09 +0100)
committerHans Kristian Rosbach <hk-git@circlestorm.org>
Wed, 11 Mar 2026 00:14:51 +0000 (01:14 +0100)
.github/workflows/codeql.yml

index 25fcc6a7b0df19f7843e50a162b678fa5f37741f..052f2ef4b8df64f1dc7238ddacc7193378550910 100644 (file)
@@ -7,8 +7,8 @@ on:
 
 jobs:
   analyze:
-    name: Analyze
-    runs-on: ubuntu-latest
+    name: CodeQL (${{ matrix.os }})
+    runs-on: ${{ matrix.os }}
     permissions:
       actions: read
       contents: read
@@ -17,7 +17,11 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        language: [ cpp ]
+        # https://codeql.github.com/docs/codeql-overview/system-requirements/
+        os:
+          - ubuntu-latest
+          - macos-latest
+          - macos-26-intel
 
     steps:
       - name: Checkout
@@ -28,13 +32,22 @@ jobs:
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v4
         with:
-          languages: ${{ matrix.language }}
+          languages: cpp
           queries: +security-and-quality
 
-      - name: Autobuild
-        uses: github/codeql-action/autobuild@v4
+      - name: Build default config
+        shell: bash
+        run: |
+          cmake -B build-default -S .
+          cmake --build build-default -j4
+
+      - name: Build compat config without optim/strategies, with reduced mem
+        shell: bash
+        run: |
+          cmake -B build-compat -S . -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF -DWITH_REDUCED_MEM=ON
+          cmake --build build-compat -j4
 
       - name: Perform CodeQL Analysis
         uses: github/codeql-action/analyze@v4
         with:
-          category: "/language:${{ matrix.language }}"
+          category: "/oss:${{ matrix.os }}"