Summary:
Add Github Action to perform some basic sanity check for PR, inclding the
following.
1) Buck TARGETS file.
On the one hand, The TARGETS file is used for internal buck, and we do not
manually update it. On the other hand, we need to run the buckifier scripts to
update TARGETS whenever new files are added, etc. With this Github Action, we
make sure that every PR does not forget this step. The GH Action uses
a Makefile target called check-buck-targets. Users can manually run `make
check-buck-targets` on local machine.
2) Code format
We use clang-format-diff.py to format our code. The GH Action in this PR makes
sure this step is not skipped. This GH Action does not use the Makefile target
called "make format" because "make format" currently runs
build_tools/format-diff.sh which requires clang-format-diff.py to be
executable. The clang-format-diff.py on our dev servers are not python3
compatible either.
On host running GH Action, it is difficult to download a file and make it
executable. Modifying build_tools/format-diff.sh is less necessary, especially
since the command we actually use for format checking is quite simple, as
illustrated in the workflow definition.
Test Plan:
Watch for Github Action result.