From a338a88313645387dbd3c69ebfb7119099706a1d Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Tue, 27 Jan 2026 23:03:24 -0800 Subject: [PATCH 1/6] Fix Windows/MSYS2/MinGW64 build failures (issue #280) Add MSYS environment support to configure.ac so users building from the MSYS shell get proper Windows configuration (winsock2.h, ws2_32 lib) instead of falling through to the Unix case (arpa/inet.h). Changes: - configure.ac: Add *-msys* case with Windows config and warning about msys-2.0.dll dependency - configure.ac: Add host triplet and Windows build status to summary - appveyor.yml: Add MSYS environment to CI matrix alongside MinGW64 - README.md: Add Windows/MSYS2 build section with step-by-step instructions and explanation of shell differences --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ appveyor.yml | 31 +++++++++++++++++++++---------- configure.ac | 12 ++++++++++++ 3 files changed, 80 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 83f0b5b6..4f4b82b3 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,53 @@ Here are listed the libhttpserver specific options (the canonical configure opti [Back to TOC](#table-of-contents) +### Building on Windows (MSYS2) + +MSYS2 provides multiple shell environments with different purposes. Understanding which shell to use is important: + +| Shell | Host Triplet | Runtime Dependency | Use Case | +|-------|--------------|-------------------|----------| +| **MinGW64** | `x86_64-w64-mingw32` | Native Windows | **Recommended** for native Windows apps | +| **MSYS** | `x86_64-pc-msys` | msys-2.0.dll | POSIX-style apps, build tools | + +**Recommended: Use the MinGW64 shell** for building libhttpserver to produce native Windows binaries without additional runtime dependencies. + +#### Step-by-step build instructions + +1. Install [MSYS2](https://www.msys2.org/) + +2. Open the **MINGW64** shell (not the MSYS shell) from the Start Menu + +3. Install dependencies: +```bash +pacman -S --needed mingw-w64-x86_64-{gcc,libtool,make,pkg-config,doxygen,gnutls,curl} autotools +``` + +4. Build and install [libmicrohttpd](https://www.gnu.org/software/libmicrohttpd/) (>= 0.9.64) + +5. Build libhttpserver: +```bash +./bootstrap +mkdir build && cd build +../configure --disable-fastopen +make +make check # run tests +``` + +**Important:** The `--disable-fastopen` flag is required on Windows as TCP_FASTOPEN is not supported. + +#### If you use the MSYS shell + +Building from the MSYS shell also works but the resulting binaries will depend on `msys-2.0.dll`. The configure script will display a warning when building in this environment. If you see: + +``` +configure: WARNING: Building from MSYS environment. Binaries will depend on msys-2.0.dll. +``` + +Consider switching to the MinGW64 shell for native Windows binaries. + +[Back to TOC](#table-of-contents) + ## Getting Started The most basic example of creating a server and handling a requests for the path `/hello`: ```cpp diff --git a/appveyor.yml b/appveyor.yml index bc2fb9e7..1ecc0fb8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,9 +2,15 @@ platform: x64 environment: matrix: - - compiler: msys2 + - compiler: mingw64 MINGW_CHOST: x86_64-w64-mingw32 MSYS2_ARCH: x86_64 + MSYS2_SHELL: mingw64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + - compiler: msys + MINGW_CHOST: x86_64-pc-msys + MSYS2_ARCH: x86_64 + MSYS2_SHELL: msys APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 init: - 'echo Building libhttpserver %version% for Windows' @@ -15,13 +21,18 @@ init: - 'echo Cygwin root is: %CYG_ROOT%' - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) install: - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-{libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl}"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed autotools"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.64.tar.gz -o libmicrohttpd-0.9.64.tar.gz"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && tar -xzf libmicrohttpd-0.9.64.tar.gz"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/libmicrohttpd-0.9.64 && ./configure --disable-examples --enable-poll=no --prefix /C/msys64 && make && make install"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && mkdir build && cd build && MANIFEST_TOOL=no; ../configure --disable-fastopen --prefix /C/msys64 CXXFLAGS=-I/C/msys64/include LDFLAGS=-L/C/msys64/lib; make"' + # Install packages (use msys2 shell for package management) + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-{libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl}"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed autotools"' + # For msys shell, also install msys-specific packages + - 'if "%compiler%"=="msys" C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed msys2-devel gcc make curl"' + # Download and build libmicrohttpd + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.64.tar.gz -o libmicrohttpd-0.9.64.tar.gz"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && tar -xzf libmicrohttpd-0.9.64.tar.gz"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/libmicrohttpd-0.9.64 && ./configure --disable-examples --enable-poll=no --prefix /C/msys64 && make && make install"' + # Bootstrap and configure libhttpserver + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && mkdir build && cd build && MANIFEST_TOOL=no; ../configure --disable-fastopen --prefix /C/msys64 CXXFLAGS=-I/C/msys64/include LDFLAGS=-L/C/msys64/lib; make"' build_script: - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && make check"' - - 'if "%compiler%"=="msys2" C:\msys64\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && cat test/test-suite.log"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && make check"' + - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && cat test/test-suite.log"' diff --git a/configure.ac b/configure.ac index 70caca8a..2ddc13b6 100644 --- a/configure.ac +++ b/configure.ac @@ -71,6 +71,16 @@ case "$host" in NETWORK_LIBS="-lws2_32" native_srcdir=$(cd $srcdir; pwd -W) ;; + *-msys*) + AC_MSG_WARN([ +Building from MSYS environment. Binaries will depend on msys-2.0.dll. +For native Windows binaries, use the MinGW64 shell instead. +]) + NETWORK_HEADER="winsock2.h" + ADDITIONAL_LIBS="-lpthread -no-undefined" + NETWORK_LIBS="-lws2_32" + native_srcdir=$(cd $srcdir; pwd -W) + ;; *-cygwin*) NETWORK_HEADER="arpa/inet.h" ADDITIONAL_LIBS="-lpthread -no-undefined" @@ -294,11 +304,13 @@ AC_OUTPUT( AC_MSG_NOTICE([Configuration Summary: Operating System: ${host_os} + Host triplet : ${host} Target directory: ${prefix} License : LGPL only Debug : ${debugit} TLS Enabled : ${have_gnutls} TCP_FASTOPEN : ${is_fastopen_supported} Static : ${static} + Windows build : ${is_windows} Build examples : ${enable_examples} ]) From 7d04659d4c0ccaaf52b78f4b721e8abaf18b74ef Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Wed, 28 Jan 2026 00:44:21 -0800 Subject: [PATCH 2/6] Migrate Windows CI from AppVeyor to GitHub Actions Integrate Windows/MSYS2 builds into the existing verify job matrix instead of using a separate AppVeyor configuration. This consolidates all CI into GitHub Actions. - Add MINGW64 and MSYS matrix entries with msys2 shell - Add MSYS2 setup and package installation steps - Add Windows-specific libmicrohttpd build with --enable-poll=no - Remove AppVeyor configuration and badge --- .github/workflows/verify-build.yml | 64 +++++++++++++++++++++++++++++- README.md | 1 - appveyor.yml | 38 ------------------ 3 files changed, 62 insertions(+), 41 deletions(-) delete mode 100644 appveyor.yml diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index e4842605..36ea8533 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -20,6 +20,9 @@ jobs: BUILD_TYPE: ${{ matrix.build-type }} CC: ${{ matrix.c-compiler }} CXX: ${{ matrix.cc-compiler }} + defaults: + run: + shell: ${{ matrix.shell }} strategy: fail-fast: false matrix: @@ -33,6 +36,7 @@ jobs: coverage: [coverage, nocoverage] linking: [dynamic, static] build-type: [classic] + shell: [bash] exclude: - os: ubuntu-latest os-type: mac @@ -271,6 +275,30 @@ jobs: cc-compiler: g++-10 debug: debug coverage: nocoverage + - test-group: basic + os: windows-latest + os-type: windows + msys-env: MINGW64 + shell: 'msys2 {0}' + build-type: classic + compiler-family: none + c-compiler: gcc + cc-compiler: g++ + debug: nodebug + coverage: nocoverage + linking: dynamic + - test-group: basic + os: windows-latest + os-type: windows + msys-env: MSYS + shell: 'msys2 {0}' + build-type: classic + compiler-family: none + c-compiler: gcc + cc-compiler: g++ + debug: nodebug + coverage: nocoverage + linking: dynamic steps: - name: Checkout repository uses: actions/checkout@v4 @@ -283,7 +311,27 @@ jobs: # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 if: ${{ github.event_name == 'pull_request' }} - + + - name: Setup MSYS2 + if: ${{ matrix.os-type == 'windows' }} + uses: msys2/setup-msys2@v2 + with: + msystem: ${{ matrix.msys-env }} + update: true + install: >- + autotools + base-devel + + - name: Install MinGW64 packages + if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MINGW64' }} + run: | + pacman --noconfirm -S --needed mingw-w64-x86_64-{toolchain,libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl} + + - name: Install MSYS packages + if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }} + run: | + pacman --noconfirm -S --needed msys2-devel gcc make curl + - name: Install Ubuntu test sources run: | sudo add-apt-repository ppa:ubuntu-toolchain-r/test ; @@ -395,6 +443,7 @@ jobs: with: path: libmicrohttpd-0.9.77 key: ${{ matrix.os }}-${{ matrix.c-compiler }}-libmicrohttpd-0.9.77-pre-built + if: ${{ matrix.os-type != 'windows' }} - name: Build libmicrohttpd dependency (if not cached) run: | @@ -403,10 +452,21 @@ jobs: cd libmicrohttpd-0.9.77 ; ./configure --disable-examples ; make ; - if: steps.cache-libmicrohttpd.outputs.cache-hit != 'true' + if: ${{ matrix.os-type != 'windows' && steps.cache-libmicrohttpd.outputs.cache-hit != 'true' }} - name: Install libmicrohttpd run: cd libmicrohttpd-0.9.77 ; sudo make install ; + if: ${{ matrix.os-type != 'windows' }} + + - name: Build and install libmicrohttpd (Windows) + if: ${{ matrix.os-type == 'windows' }} + run: | + curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.77.tar.gz -o libmicrohttpd-0.9.77.tar.gz + tar -xzf libmicrohttpd-0.9.77.tar.gz + cd libmicrohttpd-0.9.77 + ./configure --disable-examples --enable-poll=no + make + make install - name: Refresh links to shared libs run: sudo ldconfig ; diff --git a/README.md b/README.md index 4f4b82b3..b00d7be4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ Copyright (C) 2011-2019 Sebastiano Merlino. # The libhttpserver reference manual ![GA: Build Status](https://github.com/etr/libhttpserver/actions/workflows/verify-build.yml/badge.svg) -[![Build status](https://ci.appveyor.com/api/projects/status/ktoy6ewkrf0q1hw6/branch/master?svg=true)](https://ci.appveyor.com/project/etr/libhttpserver/branch/master) [![codecov](https://codecov.io/gh/etr/libhttpserver/branch/master/graph/badge.svg)](https://codecov.io/gh/etr/libhttpserver) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/1bd1e8c21f66400fb70e5a5ce357b525)](https://www.codacy.com/gh/etr/libhttpserver/dashboard?utm_source=github.com&utm_medium=referral&utm_content=etr/libhttpserver&utm_campaign=Badge_Grade) [![Gitter chat](https://badges.gitter.im/etr/libhttpserver.png)](https://gitter.im/libhttpserver/community) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 1ecc0fb8..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,38 +0,0 @@ -platform: x64 - -environment: - matrix: - - compiler: mingw64 - MINGW_CHOST: x86_64-w64-mingw32 - MSYS2_ARCH: x86_64 - MSYS2_SHELL: mingw64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - compiler: msys - MINGW_CHOST: x86_64-pc-msys - MSYS2_ARCH: x86_64 - MSYS2_SHELL: msys - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 -init: - - 'echo Building libhttpserver %version% for Windows' - - 'echo System architecture: %PLATFORM%' - - 'echo Repo build branch is: %APPVEYOR_REPO_BRANCH%' - - 'echo Build folder is: %APPVEYOR_BUILD_FOLDER%' - - 'echo Repo build commit is: %APPVEYOR_REPO_COMMIT%' - - 'echo Cygwin root is: %CYG_ROOT%' - - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) -install: - # Install packages (use msys2 shell for package management) - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-{libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl}"' - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed autotools"' - # For msys shell, also install msys-specific packages - - 'if "%compiler%"=="msys" C:\msys64\msys2_shell.cmd -defterm -no-start -msys2 -c "pacman --noconfirm -S --needed msys2-devel gcc make curl"' - # Download and build libmicrohttpd - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.64.tar.gz -o libmicrohttpd-0.9.64.tar.gz"' - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && tar -xzf libmicrohttpd-0.9.64.tar.gz"' - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/libmicrohttpd-0.9.64 && ./configure --disable-examples --enable-poll=no --prefix /C/msys64 && make && make install"' - # Bootstrap and configure libhttpserver - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"' - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER && mkdir build && cd build && MANIFEST_TOOL=no; ../configure --disable-fastopen --prefix /C/msys64 CXXFLAGS=-I/C/msys64/include LDFLAGS=-L/C/msys64/lib; make"' -build_script: - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && make check"' - - 'C:\msys64\msys2_shell.cmd -defterm -no-start -%MSYS2_SHELL% -full-path -here -c "cd $APPVEYOR_BUILD_FOLDER/build && cat test/test-suite.log"' From 1b9528c3380f757e123ec59f9be21d0a6322d523 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Wed, 28 Jan 2026 00:46:50 -0800 Subject: [PATCH 3/6] Fix missing shell parameter in matrix include entries Include entries don't inherit matrix defaults, so each needs an explicit shell value to work with the defaults.run.shell setting. --- .github/workflows/verify-build.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index 36ea8533..c4d05f38 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -66,6 +66,7 @@ jobs: cc-compiler: clang++-18 debug: debug coverage: nocoverage + shell: bash # This test gives false positives on newer versions of clang # and ubuntu-18.04 is not supported anymore on github #- test-group: extra @@ -86,6 +87,7 @@ jobs: cc-compiler: clang++-18 debug: debug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -95,6 +97,7 @@ jobs: cc-compiler: clang++-18 debug: debug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -104,6 +107,7 @@ jobs: cc-compiler: clang++-18 debug: debug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -113,6 +117,7 @@ jobs: cc-compiler: g++-9 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -122,6 +127,7 @@ jobs: cc-compiler: g++-10 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -131,6 +137,7 @@ jobs: cc-compiler: g++-11 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -140,6 +147,7 @@ jobs: cc-compiler: g++-12 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -149,6 +157,7 @@ jobs: cc-compiler: g++-13 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -158,6 +167,7 @@ jobs: cc-compiler: g++-14 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-22.04 os-type: ubuntu @@ -167,6 +177,7 @@ jobs: cc-compiler: clang++-11 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-22.04 os-type: ubuntu @@ -176,6 +187,7 @@ jobs: cc-compiler: clang++-12 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-22.04 os-type: ubuntu @@ -185,6 +197,7 @@ jobs: cc-compiler: clang++-13 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -194,6 +207,7 @@ jobs: cc-compiler: clang++-14 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -203,6 +217,7 @@ jobs: cc-compiler: clang++-15 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -212,6 +227,7 @@ jobs: cc-compiler: clang++-16 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -221,6 +237,7 @@ jobs: cc-compiler: clang++-17 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -230,6 +247,7 @@ jobs: cc-compiler: g++-14 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -239,6 +257,7 @@ jobs: cc-compiler: clang++-18 debug: nodebug coverage: nocoverage + shell: bash - test-group: performance os: ubuntu-latest os-type: ubuntu @@ -248,6 +267,7 @@ jobs: cc-compiler: g++-10 debug: nodebug coverage: nocoverage + shell: bash - test-group: performance os: ubuntu-latest os-type: ubuntu @@ -257,6 +277,7 @@ jobs: cc-compiler: g++-10 debug: nodebug coverage: nocoverage + shell: bash - test-group: performance os: ubuntu-latest os-type: ubuntu @@ -266,6 +287,7 @@ jobs: cc-compiler: g++-10 debug: nodebug coverage: nocoverage + shell: bash - test-group: extra os: ubuntu-latest os-type: ubuntu @@ -275,6 +297,7 @@ jobs: cc-compiler: g++-10 debug: debug coverage: nocoverage + shell: bash - test-group: basic os: windows-latest os-type: windows From 805e001176404fb5f6217e82ccdda0a97d82a188 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Wed, 28 Jan 2026 00:49:26 -0800 Subject: [PATCH 4/6] Fix shell for steps that run before MSYS2 setup The git checkout and failure-handling steps need explicit shell: bash since they may run before MSYS2 is set up or if MSYS2 setup fails. --- .github/workflows/verify-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index c4d05f38..a399599a 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -333,6 +333,7 @@ jobs: # If this run was triggered by a pull request event, then checkout # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 + shell: bash if: ${{ github.event_name == 'pull_request' }} - name: Setup MSYS2 @@ -532,6 +533,7 @@ jobs: fi - name: Print config.log + shell: bash run: | cd build ; cat config.log ; @@ -569,6 +571,7 @@ jobs: if: ${{ matrix.build-type != 'iwyu' }} - name: Print tests results + shell: bash run: | cd build ; cat test/test-suite.log ; From 66770e0f48387397f6e734e0171b2fde3992d738 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Wed, 28 Jan 2026 01:29:55 -0800 Subject: [PATCH 5/6] Fix MSYS package: use libcurl-devel for test headers The curl package doesn't include development headers needed for compiling tests. Use libcurl-devel which provides curl/curl.h. --- .github/workflows/verify-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index a399599a..3fd1ab2e 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -354,7 +354,7 @@ jobs: - name: Install MSYS packages if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }} run: | - pacman --noconfirm -S --needed msys2-devel gcc make curl + pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel - name: Install Ubuntu test sources run: | From 48d711172dde2fd50676c96c16a9afeb3b87e776 Mon Sep 17 00:00:00 2001 From: Sebastiano Merlino Date: Wed, 28 Jan 2026 01:44:04 -0800 Subject: [PATCH 6/6] Fix MSYS package: add libgnutls-devel for SSL tests The SSL tests (ssl_base, ssl_with_protocol_priorities, ssl_with_trust) were failing because GnuTLS wasn't installed in the MSYS environment. --- .github/workflows/verify-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-build.yml b/.github/workflows/verify-build.yml index 3fd1ab2e..7a42e5bf 100644 --- a/.github/workflows/verify-build.yml +++ b/.github/workflows/verify-build.yml @@ -354,7 +354,7 @@ jobs: - name: Install MSYS packages if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }} run: | - pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel + pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel libgnutls-devel - name: Install Ubuntu test sources run: |