Add cmake Linux build and test job (#52)
Summary:
This adds a build and test workflow using CMake on Linux. Here are some of my findings:
* The build only works if `executorch` is checked out into a directory called `executorch`. Otherwise, including `<executorch/...>` would fail (https://github.com/pytorch/test-infra/pull/4465)
* Linking with GNU ld fails with the following error `/usr/bin/ld: -f may not be used without -shared`, which I'm not sure what it means atm, so I switch to LLD by adding `add_link_options("-fuse-ld=lld")` for clang
* I still couldn't make this work on Mac yet because `libprogram_schema.a` is empty and Mac `ar` refuses to link the library. So that's an issue for another day.
```
/Library/Developer/CommandLineTools/usr/bin/ar qc libprogram_schema.a
ar: no archive members specified
```
Pull Request resolved: https://github.com/pytorch/executorch/pull/52
Reviewed By: dbort
Differential Revision: D48216923
Pulled By: huydhn
fbshipit-source-id: 0ba751e3e849ec6779b19338253dd73b7ef0f3c8 H
Huy Do committed
f66d6876e14bd5f48d31aca217f3183e0235ef8e
Parent: 30a4b36
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 8/16/2023, 4:11:07 AM