]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
[CI] Add Cygwin with gcc.
authorMika T. Lindqvist <postmaster@raasu.org>
Mon, 11 May 2026 05:54:55 +0000 (08:54 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 14 May 2026 11:15:26 +0000 (13:15 +0200)
.github/workflows/cmake.yml

index d6dfc4865cc21f7f3646b9c3f3b01d53539d3db9..e0eb85c846d0a3bc8e81240f19a70efcd61fbdfd 100644 (file)
@@ -619,6 +619,13 @@ jobs:
             cmake-args: -G Ninja -DZLIB_COMPAT=ON -DWITH_NEW_STRATEGIES=OFF -DWITH_OPTIM=OFF
             coverage: win64_gcc_compat_no_opt
 
+          - name: Windows GCC Cygwin Win64
+            os: windows-latest
+            shell: D:/cygwin/bin/bash.exe -e -o igncr -o pipefail {0}
+            compiler: gcc
+            cxx-compiler: g++
+            coverage: cygwin_gcc
+
           - name: Windows GCC MinGW32
             os: windows-latest
             shell: msys2 {0}
@@ -738,6 +745,37 @@ jobs:
         path: test/data/corpora
         show-progress: false
 
+    - name: Setup Cygwin
+      if: runner.os == 'Windows' && contains(matrix.name, 'Cygwin')
+      uses: cygwin/cygwin-install-action@v6
+      with:
+        packages: >-
+          cmake
+          gcc-core
+          gcc-g++
+          gcovr
+          make
+          libxml2-devel
+          libxslt-devel
+          python39
+          python39-colorlog
+          python39-devel
+          python39-exceptiongroup
+          python39-jinja2
+          python39-lxml
+          python39-markupsafe
+          python39-pygments
+          python39-pip
+          python39-virtualenv
+          zlib-devel
+
+    - name: Restore cached Python packages (Cygwin)
+      if: runner.os == 'Windows' && contains(matrix.name, 'Cygwin')
+      uses: actions/cache@v5
+      with:
+        path: D:\cygwin\home\runneradmin\.cache
+        key: cygwin-pip-cache
+
     - name: Setup MinGW32
       if: runner.os == 'Windows' && contains(matrix.name, 'MinGW32')
       uses: msys2/setup-msys2@v2
@@ -960,7 +998,7 @@ jobs:
         UBSAN_OPTIONS: ${{ matrix.ubsan-options || 'verbosity=0' }}:print_stacktrace=1:abort_on_error=1:halt_on_error=1
 
     - name: Generate coverage report
-      if: matrix.coverage
+      if: matrix.coverage && !contains(matrix.name, 'Cygwin')
       shell: bash
       run: |
         python3 -u -m venv ./venv
@@ -974,6 +1012,20 @@ jobs:
           --gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" \
           --xml --output ${{ matrix.coverage }}.xml
 
+    - name: Generate coverage report (Cygwin)
+      if: matrix.coverage && contains(matrix.name, 'Cygwin')
+      run: |
+        python3.9 -u -m venv --upgrade-deps --system-site-packages ./venv
+        source ./venv/bin/activate
+        python3.9 -u -m pip install gcovr
+        python3.9 -m gcovr -j 5 --gcov-ignore-parse-errors --verbose \
+          --exclude '(.*/|^)(_deps|benchmarks)/.*' \
+          --exclude-unreachable-branches \
+          --merge-mode-functions separate \
+          --merge-lines \
+          --gcov-executable "${{ matrix.gcov-exec || 'gcov' }}" \
+          --xml --output ${{ matrix.coverage }}.xml
+
     - name: Upload job coverage report to coveralls
       uses: coverallsapp/github-action@v2
       env: