Add github action to ctest lib

This commit is contained in:
Hugo Mårdbrink 2025-04-18 12:50:59 +02:00
parent 2abff63fcd
commit 187883883b

34
.github/workflows/build-and-test.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: CMake Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential
- name: Create build directory
run: mkdir -p build
- name: Configure CMake
working-directory: build
run: cmake ..
- name: Build
working-directory: build
run: make
- name: Test
working-directory: build
run: ctest --output-on-failure