Skip to content

Add unit testing framework. #127

Add unit testing framework.

Add unit testing framework. #127

Workflow file for this run

name: "Build"
on:
pull_request:
paths:
- ".github/workflows/build.yaml"
- "CMakeLists.txt"
- "examples/**/*"
- "src/**/*"
- "tests/**/*"
push:
paths:
- ".github/workflows/build.yaml"
- "CMakeLists.txt"
- "examples/**/*"
- "src/**/*"
- "tests/**/*"
workflow_call:
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os: ["macos-latest", "ubuntu-latest"]
build_type: ["Debug", "Release"]
runs-on: "${{matrix.os}}"
steps:
- uses: "actions/checkout@v4"
with:
submodules: "recursive"
- run: |
"cd Catch2 ./submodules/Catch2"
"cmake -B build -S . -DBUILD_TESTING=OFF"
"sudo cmake --build build/ --target install"
- run: "cmake -B ./build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}"
- run: "cmake --build ./build --config ${{matrix.build_type}}"
- run: "cmake --install ./build --prefix ./install"
- run: "cmake -S examples -B ./examples/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}"
- run: "cmake --build ./examples/build --config ${{matrix.build_type}}"
- run: "./build/unitTest"