Timings get auto-comitted
This commit is contained in:
@@ -4,6 +4,12 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: ["**"]
|
branches: ["**"]
|
||||||
|
|
||||||
|
push:
|
||||||
|
branches: ["**"]
|
||||||
|
# Avoid triggering on timing results auto-commits
|
||||||
|
paths-ignore:
|
||||||
|
- 'unit-tests/timing-results/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
build_and_test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -11,11 +17,14 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: true
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install dependencies (CMake + Ninja + build tools)
|
- name: Install dependencies (CMake + Ninja + build tools)
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y cmake ninja-build build-essential time
|
sudo apt-get install -y cmake ninja-build build-essential time git
|
||||||
|
|
||||||
- name: Configure project with CMake
|
- name: Configure project with CMake
|
||||||
run: cmake -G Ninja -S . -B build/
|
run: cmake -G Ninja -S . -B build/
|
||||||
@@ -34,13 +43,21 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Run matrix-timing-tests with per-test timing output
|
- name: Run matrix-timing-tests with per-test timing output and save results
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p unit-tests/timing-results
|
||||||
if [ -x build/unit-tests/matrix-timing-tests ]; then
|
if [ -x build/unit-tests/matrix-timing-tests ]; then
|
||||||
echo "Running matrix-timing-tests with timing"
|
echo "Running matrix-timing-tests with timing"
|
||||||
# Enable Catch2 timing output via command-line flag -d yes
|
/usr/bin/time -v build/unit-tests/matrix-timing-tests -d yes &> unit-tests/timing-results/matrix-timing-tests.txt
|
||||||
# Wrap with /usr/bin/time for overall runtime measurement and resource usage
|
|
||||||
/usr/bin/time -v build/unit-tests/matrix-timing-tests -d yes
|
|
||||||
else
|
else
|
||||||
echo "matrix-timing-tests executable not found or not executable"
|
echo "matrix-timing-tests executable not found or not executable"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Commit and push timing results
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add unit-tests/timing-results/matrix-timing-tests.txt
|
||||||
|
git diff --quiet --cached || git commit -m "Update matrix-timing-tests timings [skip ci]"
|
||||||
|
git push
|
||||||
|
|||||||
0
unit-tests/timing-results/matrix-timing-tests.txt
Normal file
0
unit-tests/timing-results/matrix-timing-tests.txt
Normal file
Reference in New Issue
Block a user