[llvm] Add macOS premerge check workflow (PR #207435)

Mishal Shah via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 20:56:04 PDT 2026


================
@@ -248,3 +248,121 @@ jobs:
 
           # The libcxx tests fail, so we are skipping the runtime targets.
           ninja -C build ${project_check_targets}
+
+  premerge-compute-macos-self-hosted:
+    name: Compute macOS Projects
+    if: >-
+        github.repository_owner == 'llvm' &&
+        (github.event_name != 'pull_request' || github.event.action != 'closed')
+    runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      pull-requests: read
+    outputs:
+      macos-projects: ${{ steps.vars.outputs.macos-projects }}
+      macos-check-targets: ${{ steps.vars.outputs.macos-check-targets }}
+    steps:
+      # For pull requests we get the changed files from the GitHub API, so we
+      # only need a sparse checkout of .ci/ to run compute_projects.py. For
+      # pushes (e.g. release branches) there is no PR to query, so we fall
+      # back to a git diff, which needs real history.
+      - name: Checkout LLVM (sparse)
+        if: github.event_name == 'pull_request'
+        uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+        with:
+          persist-credentials: false
+          sparse-checkout: .ci
+          sparse-checkout-cone-mode: false
+      - name: Checkout LLVM
+        if: github.event_name != 'pull_request'
+        uses: actions/checkout at de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+        with:
+          persist-credentials: false
+          fetch-depth: 2
+      - name: Get Changed Files
+        env:
+          GH_TOKEN: ${{ github.token }}
+          PR_NUMBER: ${{ github.event.pull_request.number }}
+          REPO: ${{ github.repository }}
+        run: |
+          if [[ "${{ github.event_name }}" == "pull_request" ]]; then
+            gh api "repos/${REPO}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename' > /tmp/changed_files.txt
+          else
+            git diff --name-only HEAD~1...HEAD > /tmp/changed_files.txt
+          fi
+      - name: Compute Projects
+        id: vars
+        run: |
+          python3 .ci/compute_projects.py Darwin < /tmp/changed_files.txt > /tmp/env_vars.sh
+          source /tmp/env_vars.sh
+
+          # The self-hosted macOS runners aren't set up to build/test mlir,
+          # flang (flang-rt depends on flang), or CIR (depends on mlir), so
+          # drop them here rather than in compute_projects.py, which is
----------------
shahmishal wrote:

This is now addressed with https://github.com/llvm/llvm-project/pull/207435/changes/04ff09473d9913dbdf8a634c218c256eefcd89a7. 

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


More information about the llvm-commits mailing list