CI: add basic Meson testing

I've tried to be a bit more minimal here than the CMake tests are, since
there's already a good cross section of testing there. For Meson, I just
want to touch test each of the major platforms to ensure that it works
This commit is contained in:
Dylan Baker 2024-03-13 14:03:08 -07:00
parent ef3cf0876d
commit 37c83862d3
1 changed files with 59 additions and 0 deletions

59
.github/workflows/meson.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: Meson
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
workflow_dispatch:
jobs:
build-ubuntu:
strategy:
matrix:
icu: [enabled, disabled]
name: Build and Test on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: BSFishy/meson-build@v1.0.3
with:
action: build
setup-options: -Dicu=${{ matrix.icu }}
meson-version: 0.64.1
directory: builddir
- name: Run Tests
run: meson test -C builddir
- name: Run examples
run: builddir/example
build-macos:
name: Build and Test on MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: BSFishy/meson-build@v1.0.3
with:
action: build
meson-version: 1.10.0
directory: builddir
- name: Run Tests
run: meson test -C builddir
build-windows:
name: Build and Test on Windows
runs-on: windows-latest
steps:
- uses: ilammy/msvc-dev-cmd@v1
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
- uses: BSFishy/meson-build@v1.0.3
with:
action: test
setup-options: -Dcpp_std=c++14 # MSVC doesn't actually support C++11, hide the warning
meson-version: 0.64.1
directory: builddir
- name: Run Tests
run: meson test -C builddir