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

Various fixes and updates for CI #2497

Merged
merged 21 commits into from
Mar 4, 2022
Merged

Various fixes and updates for CI #2497

merged 21 commits into from
Mar 4, 2022

Conversation

ZedThree
Copy link
Member

  • Have a build with as few dependencies as possible
  • Remove the OpenMP build -- covered by other builds
  • Automatically apply clang-format to PRs
  • Only run certain workflows on changes to certain files
    • black on changes to Python files
    • clang-format and clang-tidy on changes to C++ files
  • Bump clang-tidy-review version
    • Now makes suggestions from fixits that can be more easily applied
    • Plus cleaner config
  • Cancel previous workflows on new pushes to a branch/PR

on:
push:
paths:
- '**.py'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note we also ship executables without py extension ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, probably bin/** is sufficient here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not:

$ git grep '#!/.*/bin/.*python'|cut -d: -f1|grep -v \\\.py\$|grep -v runtest
bin/bout-add-mod-path
bin/bout-boutdata-restart-create
bin/bout-pylib-cmd-to-bin
bin/bout-pylib-cmd-to-bin
bin/bout-sonnet
examples/conduction/run
examples/elm-pb/runexample
examples/laplace-petsc3d/run
examples/staggered_grid/runandplot
manual/sphinx/user_docs/python_boutcore.rst
tests/integrated/test_suite
tests/requirements/metric_3d
tests/requirements/scipy
tools/tokamak_grids/elite/elite2nc
tools/tokamak_grids/gato/gato2nc

-DBOUT_BUILD_EXAMPLES=ON \
-DBOUT_BUILD_DOCS=OFF \
-DBOUT_ENABLE_PYTHON=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-DCMAKE_EXPORT_COMPILE_COMMANDS=On
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to run the tests twice for push+PR?
Or is that already sufficient to prevent this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This particular workflow only runs on PRs, but the main tests yes, run on both push and PR to check the merge is ok.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to check whether that changes anything? For most PRs they are based on the base branch, this is doing the same runs twice - if we could skip that, that would safe a lot of CPU time ...
But unless it is easy (which I worry it isn't) probably not worth to pursue ...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a really good question! I guess if there are commits to the base branch that are more recent than any commits in the current branch, then it's worth doing the PR jobs? It's probably worth looking to see if there's something already existing that could handle that for us

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@dschwoerer dschwoerer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the CI system

@ZedThree ZedThree merged commit b5295e2 into next Mar 4, 2022
@ZedThree ZedThree deleted the ci-fixes branch March 4, 2022 09:39
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.

None yet

2 participants