Skip to content

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

Closed
younesbelkada wants to merge 3 commits into
mainfrom
fix-ci
Closed

ENH: Run the CMake CI only when relevant files are modified#1015
younesbelkada wants to merge 3 commits into
mainfrom
fix-ci

Conversation

@younesbelkada

@younesbelkada younesbelkada commented Feb 2, 2024

Copy link
Copy Markdown
Collaborator

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
@github-actions

github-actions Bot commented Feb 2, 2024

Copy link
Copy Markdown

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
Copy Markdown
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

akx commented Feb 2, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

rickardp commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

4 participants