Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build-and-test GitHub workflow #1130

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

johnbartholomew
Copy link
Collaborator

@johnbartholomew johnbartholomew commented Feb 7, 2024

Note: I don't have a great way to check github workflow configuration syntax locally so I may need to churn through many commits for this PR

Post-merge edit: Please check the actual commit messages for details of what was done here.

Instead of running clang-format in a mode that generates XML and then
grepping and counting that output and using the shell 'test' command
on _that_ output to work out whether the formatter recommended changes,
use clang-format --dry-run -Werror so that the formatter will exit with
a failure code if it finds anything it wants to reformat, and not
otherwise do anything.

This just makes the 'test-formatting' make target a little simpler.
There are three jobs in the workflow (jobs run independently)
  - Build and Test using the plain Makefile and ./tests.sh script.
  - Build and Test using CMake & CTest.
  - Check code formatting using clang-format.

The last (check formatting) is disabled because right now the code
doesn't conform to clang-format's desired output. Once the code has
been reformatted, the workflow job can be enabled so that future PRs
can be automatically checked for format regressions.
@johnbartholomew johnbartholomew marked this pull request as ready for review February 7, 2024 18:42
@johnbartholomew johnbartholomew changed the title Create experimental build-and-test GitHub workflow Create build-and-test GitHub workflow Feb 7, 2024
@johnbartholomew johnbartholomew merged commit cb633a5 into google:master Feb 7, 2024
4 checks passed
@johnbartholomew johnbartholomew deleted the ci-test-prs branch February 9, 2024 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant