Skip to content

[ci] adjust Windows tests in .github/workflows #3

[ci] adjust Windows tests in .github/workflows

[ci] adjust Windows tests in .github/workflows #3

Workflow file for this run

name: On PRs
on: [push, pull_request]
concurrency:
group: ${{github.workflow}}-${{github.head_ref}}
cancel-in-progress: true
jobs:
Linux-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
version: '13'
- name: Install packages
run: |
python3 -m pip install meson ninja
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
Linux-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1
with:
version: '17'
- name: Install packages
run: |
python3 -m pip install meson ninja
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
brew install perl
python3 -m pip install meson ninja
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
DragonflyBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/dragonflybsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf pcre2 perl5
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
FreeBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf pcre2 perl5
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
NetBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/netbsd-vm@v1
with:
prepare: |
pkg_add cmake pkgconf pcre2 perl
run: |
cmake -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
ctest -V --test-dir build --build-config Release
OpenBSD:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: vmactions/openbsd-vm@v1
with:
prepare: |
pkg_add ninja meson pkgconf pcre2 perl5
run: |
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose
# # Solaris VM test is really slow compared to other VMs tests
# # (retrieving and installing packages is really slow)
# Solaris:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: vmactions/solaris-vm@v1
# with:
# prepare: |
# pkgutil -y -i cmake gcc5core gmake pkgconfig pcre2 perl
# run: |
# # TODO: configure matrix with Sun Studio compiler
# # TODO: figure out why pcre2 is installed but not found
# cmake -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release -DWITH_PCRE2=OFF -DWITH_PCRE=OFF
# cmake --build build --config Release
# # TODO: figure out why t/* tests are built but not found (not run)
# # TODO: figure out tests/* are not found (not run)
# # ctest --no-tests=error is also failing to fail/cause CI to fail
# ctest -V --test-dir build --build-config Release --no-tests=error
Windows-VisualStudio:
runs-on: windows-latest
name: Windows-VisualStudio-${{matrix.platform}}
strategy:
matrix:
platform: ['x64', 'win32']
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Compile and Test
run: |
cmake -G "Visual Studio 17 2022" -A "${{matrix.platform}}" -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release -DWITH_PCRE2=OFF -DWITH_PCRE=OFF -DWITH_ZLIB=OFF
cmake --build build --config Release
# run the compiled unit tests src/t/test_*;
# (skip the Perl test framework in tests/*)
# (note: tests/CMakeLists.txt also skips Perl tests/* on native WIN32)
ctest -V --test-dir build --build-config Release --no-tests=error -R '^test_'
Windows-MSYS2:
runs-on: windows-latest
name: Windows-MSYS2-${{matrix.platform}}
strategy:
matrix:
platform: ['mingw32', 'mingw64', 'ucrt64', 'clang32', 'clang64']
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.platform}}
update: true
pacboy: >-
cc:p
cmake:p
pcre2:p
pkgconf:p
- name: Compile and Test
shell: msys2 {0}
run: |
# TODO: figure out why linking modules fails due to missing
# liblighttpd.dll.a (should be import lib created from lighttpd.exe)
# Build static lighttpd.exe with (at least) modules used by tests.
# List plugins used by tests/*.conf server.modules = (...)
touch "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_access)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_accesslog)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_auth)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_authn_file)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_cgi)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_deflate)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_expire)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_extforward)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_fastcgi)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_proxy)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_redirect)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_scgi)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_setenv)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_simple_vhost)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_staticfile)" >> "${{github.workspace}}/src/plugin-static.h"
#echo "PLUGIN_INIT(mod_status)" >> "${{github.workspace}}/src/plugin-static.h"
cmake -G "Ninja" -S "${{github.workspace}}" -B "build" -Wno-dev -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON
cmake --build build --config Release
# run the compiled unit tests src/t/test_*;
# (skip the Perl test framework in tests/*)
# (note: tests/CMakeLists.txt also skips Perl tests/* on native WIN32)
ctest -V --test-dir build --build-config Release --no-tests=error -R '^test_'