Update unittest.c #49
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 CI | |
on: | |
push: | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.py" | |
- "**.build" | |
- "**.options" | |
pull_request: | |
paths: | |
- "**.c" | |
- "**.h" | |
- "**.py" | |
- "**.build" | |
- "**.options" | |
jobs: | |
build_msvc: | |
name: Building on MSVC ${{ matrix.msvc_version }} with Meson v${{ matrix.meson_version }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
msvc_version: [2015, 2017, 2019, 2022] | |
meson_version: ["1.2.0", "1.3.0", "1.4.0"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Meson and Ninja | |
shell: pwsh | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install meson==${{ matrix.meson_version }} ninja | |
if ($env:msvc_version -eq "2015") { | |
choco install visualstudio2015buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --includeRecommended --includeOptional --passive" | |
} elseif ($env:msvc_version -eq "2017") { | |
choco install visualstudio2017buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" | |
} elseif ($env:msvc_version -eq "2019") { | |
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" | |
} elseif ($env:msvc_version -eq "2022") { | |
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive" | |
} | |
$env:CC="cl.exe" | |
$env:CXX="cl.exe" | |
- name: Configure | |
run: meson setup builddir_msvc_${{ matrix.msvc_version }} --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3 | |
- name: Compile | |
run: meson compile -C builddir_msvc_${{ matrix.msvc_version }} | |
- name: Run Tests | |
run: meson test -C builddir_msvc_${{ matrix.msvc_version }} -v | |
- name: Upload Test Log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: windows_msvc_${{ matrix.msvc_version }}_meson_testlog | |
path: builddir_msvc_${{ matrix.msvc_version }}/meson-logs/testlog.txt | |
build_macosx: | |
name: Building on macOS with Xcode ${{ matrix.xcode_version }} and Meson v${{ matrix.meson_version }} | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
xcode_version: ["15.0", "15.1", "15.2", "15.3", "15.4"] | |
meson_version: ["1.2.0", "1.3.0", "1.4.0"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Xcode | |
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode_version }}.app | |
- name: Install Meson and Ninja | |
run: | | |
python -m pip install meson==${{ matrix.meson_version }} ninja | |
- name: Configure | |
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3 | |
- name: Compile | |
run: meson compile -C builddir | |
- name: Run Tests | |
run: meson test -C builddir -v | |
- name: Upload Test Log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos_xcode_${{ matrix.xcode_version }}_meson_testlog | |
path: builddir/meson-logs/testlog.txt | |
build_msys: | |
name: Building on MSYS with Meson v${{ matrix.meson_version }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
architecture: [x86, x64] | |
meson_version: ["1.2.0", "1.3.0", "1.4.0"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
- name: Set environment variables | |
run: | | |
echo "CC=/mingw${{ matrix.architecture }}/bin/gcc.exe" >> $GITHUB_ENV | |
echo "CXX=/mingw${{ matrix.architecture }}/bin/g++.exe" >> $GITHUB_ENV | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Meson and Ninja | |
run: | | |
python -m pip install meson==${{ matrix.meson_version }} ninja | |
- name: Configure | |
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3 | |
- name: Compile | |
run: meson compile -C builddir | |
- name: Run Tests | |
run: meson test -C builddir -v | |
- name: Upload Test Log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: msys_${{ matrix.architecture }}_meson_testlog | |
path: builddir/meson-logs/testlog.txt | |
build_mingw: | |
name: Building on MinGW with Meson v${{ matrix.meson_version }} | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
architecture: [x86, x64] | |
meson_version: ["1.2.0", "1.3.0", "1.4.0"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install MinGW | |
run: | | |
choco install mingw | |
- name: Set environment variables | |
run: | | |
if ($env:matrix_architecture -eq "x86") { | |
$env:CC="C:/tools/mingw32/bin/gcc.exe" | |
$env:CXX="C:/tools/mingw32/bin/g++.exe" | |
} else { | |
$env:CC="C:/tools/mingw64/bin/gcc.exe" | |
$env:CXX="C:/tools/mingw64/bin/g++.exe" | |
} | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Meson and Ninja | |
run: | | |
python -m pip install meson==${{ matrix.meson_version }} ninja | |
- name: Configure | |
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3 | |
- name: Compile | |
run: meson compile -C builddir | |
- name: Run Tests | |
run: meson test -C builddir -v | |
- name: Upload Test Log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mingw_${{ matrix.architecture }}_meson_testlog | |
path: builddir/meson-logs/testlog.txt | |
build_posix: | |
name: Building on POSIX systems with Meson v${{ matrix.meson_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04] | |
meson_version: ["1.2.0", "1.3.0", "1.4.0"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Meson and Ninja | |
run: | | |
python -m pip install meson==${{ matrix.meson_version }} ninja | |
- name: Configure | |
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3 | |
- name: Compile | |
run: meson compile -C builddir | |
- name: Run Tests | |
run: meson test -C builddir -v | |
- name: Upload Test Log | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: posix_${{ matrix.os }}_meson_testlog | |
path: builddir/meson-logs/testlog.txt |