Build & Test #1344
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: Build & Test | |
on: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13, ubuntu-20.04, windows-2019] | |
steps: | |
- if: matrix.os == 'windows-2019' | |
name: Install Cppcheck, OpenCppCoverage, and wkhtmltopdf (Windows) | |
run: | | |
choco install -y --ignore-package-exit-codes cppcheck opencppcoverage wkhtmltopdf | |
echo "C:\Program Files\Cppcheck" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "C:\Program Files\OpenCppCoverage" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
echo "C:\Program Files\wkhtmltopdf" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- if: matrix.os == 'windows-2019' | |
name: Configure MSVC (Windows) | |
uses: ilammy/msvc-dev-cmd@v1 | |
- if: matrix.os == 'macos-13' | |
name: Configure Xcode (MacOS) | |
run: | | |
sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer | |
- name: Configure Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install Meson and Ninja | |
run: | | |
pip3 install --upgrade meson ninja | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Build - Release | |
run: | | |
meson setup --buildtype=release builddir | |
meson compile -C builddir | |
- name: Test - Release | |
run: | | |
meson test -vC builddir | |
# - if: matrix.os == 'windows-2019' | |
# name: Build - Debug (Windows) | |
# run: | | |
# meson setup --buildtype=debug --wipe builddir | |
# meson compile -C builddir | |
# - if: matrix.os == 'windows-2019' | |
# name: Test - Debug (Windows) | |
# run: | | |
# meson test -vC builddir | |
# meson compile ./codecoverage -C builddir | |
# $files = (Get-ChildItem -R .\builddir\coverage\*.html) | |
# [array]::Reverse($files) | |
# wkhtmltopdf --enable-local-file-access --disable-external-links --header-center [title] $files coverage.pdf | |
# - if: matrix.os == 'windows-2019' | |
# name: Upload Coverage Report (Windows) | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: coverage | |
# path: coverage.pdf |