[llvm] [hlsl] Pin hlsl-test-all resusable workflow to main branch (PR #122518)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 10 12:18:48 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

<details>
<summary>Changes</summary>

This will cause each hlsl test workflow to load the hlsl-test-all file from the main branch instead of from the source branch of the PR.

PROs:
 * We can constrain use of the self-hosted Offload Runners to the hlsl-test-all workflow.
 * This will protect the runners from "Script Kiddie" attacks where someone submits a PR with a malicious workflow to many repositories at once.

CONs:
 * This *will not* protect the Offload Runners from someone submitting a PR that modifies the LLVM source to execute malicious code when built.
 * It will not be possible to test changes to the hlsl-test-all workflow in a PR.  We would need to set up some other process for doing this e.g. a special branch name that can be pushed to to test changes.

---
Full diff: https://github.com/llvm/llvm-project/pull/122518.diff


1 Files Affected:

- (modified) .github/workflows/hlsl-matrix.yaml (+1-1) 


``````````diff
diff --git a/.github/workflows/hlsl-matrix.yaml b/.github/workflows/hlsl-matrix.yaml
index c63a32acd2b3e0..e0185d19637ee3 100644
--- a/.github/workflows/hlsl-matrix.yaml
+++ b/.github/workflows/hlsl-matrix.yaml
@@ -23,7 +23,7 @@ jobs:
         runs-on:
           - hlsl-macos
 
-    uses: ./.github/workflows/hlsl-test-all.yaml
+    uses: llvm/llvm-project/.github/workflows/hlsl-test-all.yaml at main
     with:
       SKU: hlsl-macos
       TestTarget: check-hlsl-clang-mtl # TODO: This target changes based on SKU

``````````

</details>


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


More information about the llvm-commits mailing list