From 7d38dc6bb7607cb2f6f13a3f6199a768b35e7ae4 Mon Sep 17 00:00:00 2001 From: Bertrand Coconnier Date: Mon, 30 Dec 2024 13:14:12 +0100 Subject: [PATCH] Add a check to the CI workflow. --- .github/workflows/cpp-python-build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/cpp-python-build.yml b/.github/workflows/cpp-python-build.yml index 230ebe6041..4bf83551c1 100644 --- a/.github/workflows/cpp-python-build.yml +++ b/.github/workflows/cpp-python-build.yml @@ -509,6 +509,17 @@ jobs: rm -f _jsbsim.cxx # Make sure that jsbsim.cxx is not stored in the source distribution python -m build --sdist echo "::endgroup::" + - name: Check reset for real time execution + if: matrix.os == 'macos-14' + run: | + start_time=$(date +%s) + ./build/src/JSBSim scripts/c172_cruise_8K.xml --realtime --nice + end_time=$(date +%s) + elapsed_time=$((end_time - start_time)) + if [ $elapsed_time -lt 90 ]; then + echo "Failed - Program finished in less than 90 seconds" + exit 1 + fi # On failure, upload logs - name: On failure - Upload logs