Add _MSC_VER guards around gnu-specific attributes to avoid warnings #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: meson | |
on: [push, pull_request] | |
concurrency: | |
group: ${{github.workflow}}-${{github.head_ref}} | |
cancel-in-progress: true | |
jobs: | |
Linux-GCC: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
cxx: ['7', '8', '9', '10', '11', '13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: ${{matrix.cxx}} | |
- 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 | |
Linux-Clang: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
cxx: ['6.0', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: egor-tensin/setup-clang@v1 | |
- name: Install packages | |
run: | | |
python3 -m pip install meson ninja | |
- name: Compile and Test | |
env: | |
CXXFLAGS: -stdlib=libc++ | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 | |
meson compile -C "${{github.workspace}}/build" --verbose | |
VisualStudio: | |
runs-on: windows-latest | |
name: MSVC-${{matrix.deps}}-${{matrix.platform}} | |
strategy: | |
matrix: | |
deps: ['forcefallback', 'default'] | |
platform: ['x64', 'x86'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
python -m pip install meson ninja | |
- uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: ${{matrix.platform}} | |
- name: Compile and Test | |
run: | | |
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++latest | |
meson compile -C "${{github.workspace}}/build" --verbose | |
VisualStudio-clang-cl: | |
runs-on: windows-latest | |
name: clang-cl-${{matrix.deps}} | |
strategy: | |
matrix: | |
deps: ['forcefallback', 'default'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
python -m pip install meson ninja | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Compile and Test | |
env: | |
CC: clang-cl | |
CXX: clang-cl | |
run: | | |
meson setup "${{github.workspace}}/build" --wrap-mode=${{matrix.deps}} -Dwarning_level=3 -Dcpp_std=c++latest | |
meson compile -C "${{github.workspace}}/build" --verbose | |
Cygwin: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: 'MSYS' | |
install: >- | |
gcc | |
meson | |
ninja | |
- name: Compile and Test | |
run: | | |
meson setup build -Dwarning_level=3 -Dcpp_std=gnu++20 | |
meson compile -C build --verbose | |
meson test -C build --verbose | |
MacOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install packages | |
run: | | |
python3 -m pip install meson ninja | |
- name: Compile and Test | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 | |
meson compile -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 curl ninja meson pkgconf expat libmicrohttpd | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 | |
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 curl ninja meson pkgconf libmicrohttpd | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 | |
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: | |
release: '9.0' | |
prepare: | | |
/usr/sbin/pkg_add curl meson pkgconf libmicrohttpd | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 | |
meson compile -C "${{github.workspace}}/build" --verbose | |
meson test -C "${{github.workspace}}/build" --verbose | |
OpenBSD: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: vmactions/openbsd-vm@v1 | |
with: | |
prepare: | | |
pkg_add curl ninja meson pkgconf libmicrohttpd | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 | |
meson compile -C "${{github.workspace}}/build" --verbose | |
meson test -C "${{github.workspace}}/build" --verbose | |
Alpine: | |
runs-on: ubuntu-latest | |
container: | |
image: alpine | |
steps: | |
- name: Install packages | |
run: | | |
apk add curl-dev expat-dev g++ gcc git libmicrohttpd-dev linux-headers pkgconf meson samurai | |
git config --global --add safe.directory '*' | |
- uses: actions/checkout@v4 | |
- name: Sanity Checks | |
run: | | |
meson setup "${{github.workspace}}/build" -Dwarning_level=3 -Dcpp_std=c++20 | |
meson compile -C "${{github.workspace}}/build" --verbose | |
meson test -C "${{github.workspace}}/build" --verbose |