JSBSim-Team / jsbsim

An open source flight dynamics & control software library
GNU Lesser General Public License v2.1
1.22k stars 420 forks source link

Run tests on M1 MacOS runners. #1030

Closed bcoconni closed 2 months ago

bcoconni commented 2 months ago

Until now we were only testing that JSBSim was successfully compiling on Apple M1 chips using cross-compilation on Intel MacOS GitHub runners. The resulting binaries were not tested on the actual hardware so we were happily assuming that if it compiles then it runs swiftly. And everyone knows how reliable that criterion is :smile:

These dark ages are now over: GitHub just introduced M1 MacOS runners, so this PR implements the testing of JSBSim on that platform.

Note that the floating point precision requirement had to be slightly relaxed at some places in the unit tests ...despite using the flag -fno-fast-math. If someone who has access to an M1 Macbook or equivalent knows better then by all means submit fixes :+1:

Note also that the issue that was fixed by PR #143 (random failure of TestActuator.py) is resurfacing with M1 MacOS runners. This has been fixed again by extending further the waiting time of test_regression_bug_1503: https://github.com/JSBSim-Team/jsbsim/blob/6f0c4d805c499cf18280bcf8d7af358aee494876/tests/TestActuator.py#L94-L130

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (6f0c4d8) 24.87% compared to head (b46fd66) 24.87%. Report is 2 commits behind head on master.

:exclamation: Current head b46fd66 differs from pull request most recent head d63bf5f. Consider uploading reports for the commit d63bf5f to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1030 +/- ## ======================================= Coverage 24.87% 24.87% ======================================= Files 168 168 Lines 18908 18908 ======================================= Hits 4704 4704 Misses 14204 14204 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bcoconni commented 2 months ago

And in case someone asks: the test job on M1 chips uses Python 3.10 (instead of Python 3.8 for other platforms) because Python<=3.9 is not available on the M1 MacOS runners.