[llvm] [GitHub] Add basic CI for libclang Python binding unit tests (PR #76784)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 3 20:31:03 PST 2024


================
@@ -0,0 +1,39 @@
+name: Libclang Python Binding Tests
+
+permissions:
+  contents: read
+
+on:
+  workflow_dispatch:
+  push:
----------------
boomanaiden154 wrote:

> 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:

I do see that. I didn't realize that was a thing (must be pretty recent). Most LLVM forks are old however (at least for active contributors). We could get people to enable them and I guess active contributors would be the only ones seeing it and should be able to do so relatively easily, but it is another step.

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

The run that you mentioned is a PR (https://github.com/llvm/llvm-project/pull/77112) that has absolutely nothing to do with the libclang python bindings. I think this is normally an issue with merge commits, but there wasn't even one there in that case (probably due to the force-push). Sure, it just runs on the last commit, but it never should be running on that PR in the first place because it isn't relevant and potential noise to whoever is working on it. It's also just duplicate coverage as the last time `main` changed with the path-based filtering, the action should have already run. From what I can tell spurious runs like this stopped after I pushed the minor fix commit. We also need to be conservative with what we do run as we don't have that much compute.

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

Sure, but I think the main issue is when actions fail and then an automatic email notification is sent out. If the actions just cancelled, nothing gets sent and no compute is spent where someone probably doesn't want/need it.

This is also probably much better discussed on Discourse rather than buried in this merged PR.

https://github.com/llvm/llvm-project/pull/76784


More information about the llvm-commits mailing list