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

ENH: Run the CMake CI only when relevant files are modified #1015

Closed
wants to merge 3 commits into from

Conversation

younesbelkada
Copy link
Collaborator

@younesbelkada younesbelkada commented Feb 2, 2024

As per title

cc @Titus-von-Koeller @akx @wkpark

Similar PR as: huggingface/trl#1309

@younesbelkada younesbelkada changed the title ENH: Run the CI only when relevant files are modified ENH: Run the CMake CI only when relevant files are modified Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@younesbelkada
Copy link
Collaborator Author

Turns out this simply filters out PRs that touches certain files, but it will still trigger the CI on each commit in case that condition is not met. For changing the behaviour to inspect each commit, we need a more elaborated workflow and I am not sure it is something we 100% want for now

@akx
Copy link
Contributor

akx commented Feb 2, 2024

I'm not sure this is worth it right now. I foresee it'll bite us when CI is unexpectedly not run when it should because someone reorganizes the repo and doesn't know this filter list is there.

@younesbelkada
Copy link
Collaborator Author

Makes sense, I am happy either way - @Titus-von-Koeller I will let you decide on this if we should merge it !

@Titus-von-Koeller
Copy link
Collaborator

I would really like to have this, but it's not a top prio. @wkpark and @rickardp do you see any issues with this approach or something similar?

It just seems so wasteful to run on every commit, unless it's really needed.

@rickardp
Copy link
Contributor

rickardp commented Feb 6, 2024

I added this too, because the docs were updated a lot. But maybe it would be better to turn it around and exclude patterns instead?

@Titus-von-Koeller
Copy link
Collaborator

I added this too, because the docs were updated a lot. But maybe it would be better to turn it around and exclude patterns instead?

@rickardp You added this where? Is your approach still in a PR, which one?

Yeah, let's implement something like this. Why do you think an exclude would be better?

This should only run when C, C++, CUDA code needs recompiling, right? In that case, wouldn't the below be enough?

      - "csrc/**"
      - "include/**"

@rickardp
Copy link
Contributor

What is in this PR is already merged. Note that this PR references a different file.

I think it is worth considering reversing the pattern to avoid that a file structure change causes workflows not to run. But there are downsides to that approach too.

@younesbelkada
Copy link
Collaborator Author

Thanks everyone for the clarification ! I just closed the PR :D

@Titus-von-Koeller Titus-von-Koeller deleted the fix-ci branch March 27, 2024 17:31
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

4 participants