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

[Github Config] Launch testing jobs only with code changes #1941

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

danhoeflinger
Copy link
Contributor

@danhoeflinger danhoeflinger commented Nov 19, 2024

Skip testing for PRs which don't affect code / testing.

Require that they touch files in one of the following paths:

      - '.github/**/*'
      - 'cmake/**/*'
      - 'include/**/*'
      - 'test/**/*'

Always run codespell and documentation jobs.

Comment on lines +11 to +15
paths:
- '.github/**/*'
- 'cmake/**/*'
- 'include/**/*'
- 'test/**/*'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the important addition, everything else is just separating / moving the jobs as is to a new workflow

Copy link
Contributor

@MikeDvorskiy MikeDvorskiy Nov 20, 2024

Choose a reason for hiding this comment

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

I guess, we should add examples and make as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, I was thinking about changes which would impact the test results.
As far as I know, we don't test the examples in the CI.
I believe the make configuration is more of a legacy thing which is made available to people but goes unused in the CI. I believe the CI tests use cmake. I'm honestly not sure the make configuration still works, it looks like you had the last change to that directory, are you still using / maintaining those build files?

Copy link
Contributor

Choose a reason for hiding this comment

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

  1. about make:
    I don't know reasons why 'make' would not work.
    Make configuration still works, I use it.
    But if CI doesn't use make files, we can exclude that folder, of course.

  2. "we don't test the examples in the CI."..
    Interesting, it was done intentionally to minimize CI per commit time or just we forgot about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. about make:
    I don't know reasons why 'make' would not work.
    Make configuration still works, I use it.
    But if CI doesn't use make files, we can exclude that folder, of course.

As far as I understand, the CI generates "fresh" build configuration using cmake, then uses that build configuration to build the tests. Of course, there is nothing wrong with using the make config if it works, it just has not changed much in the last few years and I don't actively use it. So I'm not aware of its current support for all cases.

  1. "we don't test the examples in the CI."..
    Interesting, it was done intentionally to minimize CI per commit time or just we forgot about that?

Its possible we build and run the examples and I am unaware of it. I can try to look into this. It would be a good idea to do if we aren't already. I suppose we can add it in here in anticipation of adding these to the CI in the future.

Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev Nov 20, 2024

Choose a reason for hiding this comment

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

Should the paths include CMakeLists.txt as well? This is what the CI uses.

Including the rest (e.g. make and examples) seems unnecessary to me as it is not currently handled by the CI. Moreover, when CI is skipped, it is a good indicator that a certain feature has not been tested.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point about CMakeLists.txt ...
Let me add that.
I'm OK with leaving out examples for now, and adding it if we add it in the future to the CI.

@danhoeflinger
Copy link
Contributor Author

Please see https://github.com/oneapi-src/oneDPL/actions/runs/11918913730
and https://github.com/oneapi-src/oneDPL/actions
To see that before the .github folder was added to the paths list, that only the documentation workflow was launched (codespell and documentation), once I added the .github folder to the path filter, all jobs were launched (see current CI actions).

@danhoeflinger danhoeflinger changed the title [Draft] [github] Change testing actions to only run with code changes [Github Config] Change testing actions to only run with code changes Nov 19, 2024
@danhoeflinger danhoeflinger changed the title [Github Config] Change testing actions to only run with code changes [Github Config] Launch testing actions to only run with code changes Nov 19, 2024
@danhoeflinger danhoeflinger changed the title [Github Config] Launch testing actions to only run with code changes [Github Config] Launch testing jobs only with code changes Nov 19, 2024
Comment on lines +11 to +15
paths:
- '.github/**/*'
- 'cmake/**/*'
- 'include/**/*'
- 'test/**/*'
Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev Nov 20, 2024

Choose a reason for hiding this comment

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

Should the paths include CMakeLists.txt as well? This is what the CI uses.

Including the rest (e.g. make and examples) seems unnecessary to me as it is not currently handled by the CI. Moreover, when CI is skipped, it is a good indicator that a certain feature has not been tested.

.github/workflows/ci-testing.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
Signed-off-by: Dan Hoeflinger <[email protected]>
@danhoeflinger
Copy link
Contributor Author

@timmiesmith I updated the badge support on the Readme.md to use the badge from the testing workflow. Do you want me to add one for the docs as well? I don't want to clutter it.

Copy link
Contributor

@dmitriy-sobolev dmitriy-sobolev left a comment

Choose a reason for hiding this comment

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

LGTM. Could you wait for the CI completion before merging?

@danhoeflinger danhoeflinger merged commit 66cc13b into main Nov 20, 2024
22 checks passed
@danhoeflinger danhoeflinger deleted the dev/dhoeflin/separate_test_ci branch November 20, 2024 22:14
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.

3 participants