Merge pull request #5 from ccrma/file_structure #66
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 starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: Build and Unit Tests | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | |
fail-fast: false | |
# Set up a matrix to run the following 3 configurations: | |
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator> | |
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator> | |
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator> | |
# | |
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
build_type: [Release] | |
include: | |
- os: windows-latest | |
c_compiler: cl | |
cpp_compiler: cl | |
meson_flags: --backend vs | |
- os: ubuntu-latest | |
c_compiler: gcc | |
cpp_compiler: g++ | |
- os: macos-latest | |
c_compiler: clang | |
cpp_compiler: clang++ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: python -m pip install meson ninja | |
- name: Add msbuild to PATH | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: microsoft/setup-msbuild@v2 | |
- name: Configure Project | |
run: meson setup builddir/ ${{ matrix.meson_flags }} | |
env: | |
CC: ${{ matrix.c_compiler }} | |
CXX: ${{ matrix.cpp_compiler }} | |
- name: Compile | |
run: meson compile -C builddir/ | |
- name: Run Tests | |
run: "meson test -C builddir/ -v chump:" |