2020 BUILD_TYPE : ${{ matrix.build-type }}
2121 CC : ${{ matrix.c-compiler }}
2222 CXX : ${{ matrix.cc-compiler }}
23+ defaults :
24+ run :
25+ shell : ${{ matrix.shell }}
2326 strategy :
2427 fail-fast : false
2528 matrix :
3336 coverage : [coverage, nocoverage]
3437 linking : [dynamic, static]
3538 build-type : [classic]
39+ shell : [bash]
3640 exclude :
3741 - os : ubuntu-latest
3842 os-type : mac
@@ -271,6 +275,30 @@ jobs:
271275 cc-compiler : g++-10
272276 debug : debug
273277 coverage : nocoverage
278+ - test-group : basic
279+ os : windows-latest
280+ os-type : windows
281+ msys-env : MINGW64
282+ shell : ' msys2 {0}'
283+ build-type : classic
284+ compiler-family : none
285+ c-compiler : gcc
286+ cc-compiler : g++
287+ debug : nodebug
288+ coverage : nocoverage
289+ linking : dynamic
290+ - test-group : basic
291+ os : windows-latest
292+ os-type : windows
293+ msys-env : MSYS
294+ shell : ' msys2 {0}'
295+ build-type : classic
296+ compiler-family : none
297+ c-compiler : gcc
298+ cc-compiler : g++
299+ debug : nodebug
300+ coverage : nocoverage
301+ linking : dynamic
274302 steps :
275303 - name : Checkout repository
276304 uses : actions/checkout@v4
@@ -283,7 +311,27 @@ jobs:
283311 # the head of the pull request instead of the merge commit.
284312 - run : git checkout HEAD^2
285313 if : ${{ github.event_name == 'pull_request' }}
286-
314+
315+ - name : Setup MSYS2
316+ if : ${{ matrix.os-type == 'windows' }}
317+ uses : msys2/setup-msys2@v2
318+ with :
319+ msystem : ${{ matrix.msys-env }}
320+ update : true
321+ install : >-
322+ autotools
323+ base-devel
324+
325+ - name : Install MinGW64 packages
326+ if : ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MINGW64' }}
327+ run : |
328+ pacman --noconfirm -S --needed mingw-w64-x86_64-{toolchain,libtool,make,pkg-config,libsystre,doxygen,gnutls,graphviz,curl}
329+
330+ - name : Install MSYS packages
331+ if : ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }}
332+ run : |
333+ pacman --noconfirm -S --needed msys2-devel gcc make curl
334+
287335 - name : Install Ubuntu test sources
288336 run : |
289337 sudo add-apt-repository ppa:ubuntu-toolchain-r/test ;
@@ -395,6 +443,7 @@ jobs:
395443 with :
396444 path : libmicrohttpd-0.9.77
397445 key : ${{ matrix.os }}-${{ matrix.c-compiler }}-libmicrohttpd-0.9.77-pre-built
446+ if : ${{ matrix.os-type != 'windows' }}
398447
399448 - name : Build libmicrohttpd dependency (if not cached)
400449 run : |
@@ -403,10 +452,21 @@ jobs:
403452 cd libmicrohttpd-0.9.77 ;
404453 ./configure --disable-examples ;
405454 make ;
406- if : steps.cache-libmicrohttpd.outputs.cache-hit != 'true'
455+ if : ${{ matrix.os-type != 'windows' && steps.cache-libmicrohttpd.outputs.cache-hit != 'true' }}
407456
408457 - name : Install libmicrohttpd
409458 run : cd libmicrohttpd-0.9.77 ; sudo make install ;
459+ if : ${{ matrix.os-type != 'windows' }}
460+
461+ - name : Build and install libmicrohttpd (Windows)
462+ if : ${{ matrix.os-type == 'windows' }}
463+ run : |
464+ curl https://s3.amazonaws.com/libhttpserver/libmicrohttpd_releases/libmicrohttpd-0.9.77.tar.gz -o libmicrohttpd-0.9.77.tar.gz
465+ tar -xzf libmicrohttpd-0.9.77.tar.gz
466+ cd libmicrohttpd-0.9.77
467+ ./configure --disable-examples --enable-poll=no
468+ make
469+ make install
410470
411471 - name : Refresh links to shared libs
412472 run : sudo ldconfig ;
0 commit comments