[llvm] [GitHub] Add basic CI for libclang Python binding unit tests (PR #76784)
Craig Hesling via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 3 19:56:06 PST 2024
================
@@ -0,0 +1,39 @@
+name: Libclang Python Binding Tests
+
+permissions:
+ contents: read
+
+on:
+ workflow_dispatch:
+ push:
----------------
linux4life798 wrote:
> I don't know which solution is best, but we have had people complain in the past about unwanted workflows running in their forks. I'm not sure if they were aware of this option, though.
>
> If we want to change our policy and remove the llvm org and llvm/llvm-project repo restrictions from our workflows, then I think we need an RFC to see how the rest of the community and the fork owners feel about this.
Fair. I have certainly been annoyed by failing action results in the past.
----
> Being automatically disabled is referring to scheduled workflows. This is not a scheduled workflow.
Ohhh, I see that in the documentation, but that wasn't what I was referring to. I guess that is yet another automatic action disablement feature.
What I'm talking about seems to be weirdly undocumented. When you fork a repo with actions, you see the following message that forces you to opt-in to running actions/workflows:
![image](https://github.com/llvm/llvm-project/assets/1373879/e3d546a6-9368-41a2-96a6-7beeb4c5ceee)
Am I the only one who sees this? Try yourself by forking https://github.com/repo-sync/github-sync, which only has one on-push-tags action.
---
> When the workflow is setup to also work on pushes anywhere, it runs on PRs it is not supposed to (at least from what I can tell).
Hmm. I didn't see any spurious Action runs in llvm proper. There are some confusing runs, like https://github.com/llvm/llvm-project/actions/runs/7445527409. When you dig into it, it looks like the rationale is that a parent commit did touch one of the filtered paths. If you push a bunch of commits, it won't run the action on each individual commit. It just runs the action on the last commit, but takes into account all paths touch since the last run. This is good.
> It is more difficult to test in forks with these settings, but there are practical issues as mentioned above, and it's not really expected behavior. It's easy enough if you're working on the workflows to push another commit disabling some of the checks to make testing easier. I don't think making the tests opt-out by default on forks is a good idea.
For new users, you need to opt-in to enable actions. For existing users, you can disable all actions if you think they are annoying. Otherwise, it seems like a bonus add to be able to have you code automatically checked, assuming the rules for them to run are configured properly.
To be totally honest, I still have to manually disable all of the Actions I'm not interested in, since `if: github.repository_owner == 'llvm'` just results in the action being canceled. Seeing all the Canceled run item in the **All workflows** is still too annoying.
![image](https://github.com/llvm/llvm-project/assets/1373879/07e1909e-c910-4119-b99b-da7f1f7e63e1)
https://github.com/llvm/llvm-project/pull/76784
More information about the llvm-commits
mailing list