Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add github CI #125

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 15 additions & 39 deletions .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,40 @@ concurrency:

jobs:

Ubuntu-gcc:
Linux-GCC:
runs-on: ubuntu-latest
name: Linux-GCC${{matrix.cxx}}-deps=${{matrix.deps}}
strategy:
matrix:
cxx: ['11']
deps: ['enabled', 'disabled']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-gcc@v1
with:
version: '13'
- name: Install packages
run: |
sudo apt install -y g++-${{matrix.cxx}}
python3 -m pip install meson ninja
- name: Compile and Test
env:
CXX: g++-${{matrix.cxx}}
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3
meson setup "${{github.workspace}}/build" -Dwarning_level=3
meson compile -C "${{github.workspace}}/build" --verbose
meson test -C "${{github.workspace}}/build" --verbose

Ubuntu-clang:
Linux-Clang:
runs-on: ubuntu-latest
name: Linux-Clang${{matrix.cxx}}-deps=${{matrix.deps}}
strategy:
matrix:
cxx: ['14']
deps: ['enabled', 'disabled']
steps:
- uses: actions/checkout@v4
- uses: egor-tensin/setup-clang@v1
with:
version: '17'
- name: Install packages
run: |
sudo apt install -y clang-${{matrix.cxx}} libc++abi-${{matrix.cxx}}-dev libc++-${{matrix.cxx}}-dev lld-${{matrix.cxx}}
python3 -m pip install meson ninja
- name: Compile and Test
env:
CXX: clang++-${{matrix.cxx}}
CXXFLAGS: -stdlib=libc++
CXX_LD: lld-${{matrix.cxx}}
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3
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
name: macOS-deps=${{matrix.deps}}
strategy:
matrix:
deps: ['enabled', 'disabled']
steps:
- uses: actions/checkout@v4
- name: Install packages
Expand All @@ -66,17 +50,15 @@ jobs:
python3 -m pip install meson ninja
- name: Compile and Test
run: |
meson setup "${{github.workspace}}/build" -Dauto_features=${{matrix.deps}} -Dwarning_level=3
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
name: DragonflyBSD
steps:
- uses: actions/checkout@v4
- name: DragonflyBSD
uses: vmactions/dragonflybsd-vm@v1
- uses: vmactions/dragonflybsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf pcre2 perl5
Expand All @@ -87,11 +69,9 @@ jobs:

FreeBSD:
runs-on: ubuntu-latest
name: FreeBSD
steps:
- uses: actions/checkout@v4
- name: FreeBSD
uses: vmactions/freebsd-vm@v1
- uses: vmactions/freebsd-vm@v1
with:
prepare: |
pkg install -y ninja meson pkgconf pcre2 perl5
Expand All @@ -102,11 +82,9 @@ jobs:

NetBSD:
runs-on: ubuntu-latest
name: NetBSD
steps:
- uses: actions/checkout@v4
- name: NetBSD
uses: vmactions/openbsd-vm@v1
- uses: vmactions/openbsd-vm@v1
with:
prepare: |
pkg_add ninja meson pkgconf pcre2 perl5
Expand All @@ -118,11 +96,9 @@ jobs:

OpenBSD:
runs-on: ubuntu-latest
name: OpenBSD
steps:
- uses: actions/checkout@v4
- name: OpenBSD
uses: vmactions/openbsd-vm@v1
- uses: vmactions/openbsd-vm@v1
with:
prepare: |
pkg_add ninja meson pkgconf pcre2 perl5
Expand Down
6 changes: 0 additions & 6 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,6 @@ option('warn_cflags',
description: 'CFLAGS to use when build_extra_warnings is active',
)

option('build_static',
type: 'boolean',
value: false,
description: 'build a static lighttpd with all modules added',
)

option('moduledir',
type: 'string',
value: 'lib/lighttpd',
Expand Down
6 changes: 2 additions & 4 deletions src/first.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@
#define _POSIX
#define __USE_MINGW_ALARM 1
/* https://sourceforge.net/p/mingw-w64/wiki2/gnu%20printf/ */
#define __USE_MINGW_ANSI_STDIO 1
/*#include <stdio.h>*/
#include <stdio.h>
#undef __printf__
/*#define __printf__ __MINGW_PRINTF_FORMAT*/
#define __printf__ __gnu_printf__
#define __printf__ __MINGW_PRINTF_FORMAT
/* override pid_t before <sys/types.h> is included; modified from:
* /usr/x86_64-w64-mingw32/sys-root/mingw/include/sys/types.h */
#ifndef _PID_T_
Expand Down
10 changes: 5 additions & 5 deletions src/fs_win32.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ int fs_win32_openUTF8 (const char *path, int oflag, int pmode);
#define mkdir(a,b) fs_win32_mkdirUTF8((a),(b))
int fs_win32_mkdirUTF8 (const char *path, mode_t mode);

#undef stat
#undef fstat
#define stat fs_win32_stati64UTF8
#define fstat(fd,st) _fstati64((fd),(struct _stati64 *)(st))
//#undef stat
//#undef fstat
//#define stat fs_win32_stati64UTF8
//#define fstat(fd,st) _fstati64((fd),(struct _stati64 *)(st))

/*('#define stat fs_win32_stati64UTF8' must handle 'struct stat' definitions)*/
struct fs_win32_stati64UTF8 {
#if 1 /*(?non-standard?) (appears to work)*/
#if 0 /*(?non-standard?) (appears to work)*/
struct _stati64; /*(intentionally unnamed for transparent struct)*/
#else
/* /usr/x86_64-w64-mingw32/sys-root/mingw/include/_mingw_stat64.h */
Expand Down
10 changes: 5 additions & 5 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ conf_data.set_quoted('PACKAGE_NAME', meson.project_name())
conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
conf_data.set_quoted('LIBRARY_DIR', moduledir)

conf_data.set('LIGHTTPD_STATIC', get_option('build_static'))
conf_data.set('LIGHTTPD_STATIC', get_option('default_library') == 'static')
libdl = []
if not(get_option('build_static'))
if get_option('default_library') != 'static'
if target_machine.system() != 'windows'
libdl = [ compiler.find_library('dl', required: false) ]
if not(compiler.has_function('dlopen', args: defs, dependencies: libdl, prefix: '#include <dlfcn.h>'))
Expand Down Expand Up @@ -582,7 +582,7 @@ builtin_mods = files(
'mod_scgi.c',
)

if get_option('build_static')
if get_option('default_library') == 'static'
builtin_mods += files(
'mod_accesslog.c',
'mod_ajp13.c',
Expand Down Expand Up @@ -643,7 +643,7 @@ common_flags = [ declare_dependency(
lighttpd_flags = []
lighttpd_angel_flags = []

if get_option('build_static')
if get_option('default_library') == 'static'
lighttpd_flags += [ libcrypt, libbz2, libz, libzstd, libbrotli, libdeflate, libelftc ]
else
if target_machine.system() == 'windows' or target_machine.system() == 'cygwin'
Expand Down Expand Up @@ -765,7 +765,7 @@ test('test_mod', executable('test_mod',
build_by_default: false,
))

if get_option('build_static')
if get_option('default_library') == 'static'
modules = []
else
modules = [
Expand Down