-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
3 changed files
with
102 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Meson | ||
|
||
on: | ||
push: | ||
branches: [ master, main ] | ||
pull_request: | ||
branches: [ master, main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-ubuntu: | ||
name: Build and Test on Ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v5 | ||
- uses: BSFishy/[email protected] | ||
with: | ||
action: test | ||
meson-version: 0.64.1 | ||
|
||
build-macos: | ||
name: Build and Test on MacOS | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v5 | ||
- uses: BSFishy/[email protected] | ||
with: | ||
action: test | ||
meson-version: 0.64.1 | ||
|
||
build-windows: | ||
name: Build and Test on Windows | ||
runs-on: windows-latest | ||
env: | ||
CXX: clang-cl | ||
steps: | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v5 | ||
- uses: BSFishy/[email protected] | ||
with: | ||
action: test | ||
setup-options: -Dcpp_std=c++14 # Clang-CL doesn't actually support C++11, hide the warning | ||
meson-version: 0.64.1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Copyright © 2024 Dylan Baker | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
inc = include_directories('../include') | ||
|
||
test( | ||
'link', | ||
executable( | ||
'link_test', | ||
'link_a.cpp', 'link_b.cpp', | ||
dependencies : dep_icu, | ||
include_directories : inc, | ||
) | ||
) | ||
|
||
test( | ||
'options', | ||
executable( | ||
'options_test', | ||
'main.cpp', 'options.cpp', | ||
dependencies : dep_icu, | ||
include_directories : inc, | ||
) | ||
) | ||
|
||
if cpp.get_id() == 'clang' and host_machine.system() == 'linux' | ||
executable( | ||
'fuzzer', | ||
'fuzz.cpp', | ||
cpp_args : ['-fsanitize=fuzzer'], | ||
link_args : ['-fsanitize=fuzzer'], | ||
dependencies : dep_icu, | ||
include_directories : inc, | ||
) | ||
endif | ||
|
||
# Meson can generate basic cmake-configs files, but not when targets are used, | ||
# so these tests don't make sense |