Added a merge checker script that has to run before you can merge to main

Updated merge checker and seperated the matrix tests fro mthe timing tests
This commit is contained in:
2025-05-21 17:48:18 -04:00
parent 8a15459fc8
commit a5dbd01aa1
7 changed files with 181 additions and 219 deletions

View File

@@ -5,22 +5,44 @@ on:
branches: ["**"]
jobs:
build:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Install dependencies (CMake + Ninja + Compiler)
- name: Install dependencies (CMake + Ninja + build tools)
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential
sudo apt-get install -y cmake ninja-build build-essential time
- name: Configure project with CMake
run: |
cmake -G Ninja -S . -B build/
run: cmake -G Ninja -S . -B build/
- name: Build with Ninja
run: ninja -C build/
- name: Run all unit tests except matrix-timing-tests
run: |
ninja -C build/
for test_exec in build/unit-tests/matrix-tests build/unit-tests/quaternion-tests build/unit-tests/vector-3d-tests; do
if [ -x "$test_exec" ]; then
echo "Running $test_exec"
"$test_exec"
else
echo "Warning: $test_exec not found or not executable"
fi
done
- name: Run matrix-timing-tests with per-test timing output
run: |
if [ -x build/unit-tests/matrix-timing-tests ]; then
echo "Running matrix-timing-tests with timing"
# Run the test executable and capture timing info
# Assuming the executable prints timings per test internally
# If not, you might want to wrap each subtest with 'time' or
# run the entire executable with time:
/usr/bin/time -v build/unit-tests/matrix-timing-tests
else
echo "matrix-timing-tests executable not found or not executable"
fi