symforce-org / symforce

Fast symbolic computation, code generation, and nonlinear optimization for robotics
https://symforce.org
Apache License 2.0
1.44k stars 147 forks source link

Add SymForce CI #189

Closed bradley-solliday-skydio closed 2 years ago

bradley-solliday-skydio commented 2 years ago

Add a github actions workflow to build SymForce and run all tests on every combination of:

Not tested on ubuntu jammy [22.04] because our vendorized version of Catch2 does not compile on jammy (not sure why exactly).

Not testing on clang because couldn't get it to build, and figured I'd save the task of adding clang for another day.

Not testing on mac or windows because that seems like a large enough of a task to warrant leaving for another day.

Some notes on what changes needed to get the build and tests working

Ignore build dir during make lint

Newer versions of pip (like 22.1.2) no longer copy the source dir into a temporary dir, so tools like setuptools will generate their temporary build dirs directly into the src dir.

mypy get's tripped up by the fact that there are two copies of a bunch of modules, so we need to make sure we only tell it to lint one of them.

Local symengine in python3.10

For reasons that I don't fully understand, symengine is being built into a different location when building using python3.10 than it is for python3.9 and python3.8. So I modify symforce.__init__.py to make to check this alternative location as well.

hmartiro commented 2 years ago

Awesome to see the checks running on this PR!