[llvm] [premerge] Use powershell instead of cmd for the Build and Test step (PR #216883)

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 17:10:45 PDT 2026


https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/216883

>From c03660614fb75e2dca6e517f0743577e19366ad1 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 17 Aug 2026 16:39:42 -0700
Subject: [PATCH 1/2] [premerge] Use powershell instead of cmd for the Build
 and Test step

Scanning tool identified using the cmd shell as a misfeature:
https://github.com/llvm/llvm-project/security/code-scanning/1691

powershell is the default shell for Windows.
---
 .github/workflows/premerge.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 8c8d63fb5beca..1d89f246d36ec 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -164,7 +164,7 @@ jobs:
       - name: Build and Test
         timeout-minutes: 180
         if: ${{ steps.vars.outputs.windows-projects != '' }}
-        shell: cmd
+        shel: pwsh
         env:
           GITHUB_TOKEN: ${{ github.token }}
           GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
@@ -173,7 +173,7 @@ jobs:
           WINDOWS_RUNTIMES: ${{ steps.vars.outputs.windows-runtimes }}
           WINDOWS_RUNTIMES_CHECK_TARGETS: ${{ steps.vars.outputs.windows-runtimes-check-targets }}
         run: |
-          call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
+          & "C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat" -arch=amd64 -host_arch=amd64
           # See the comments above in the Linux job for why we define each of
           # these environment variables.
           bash -c "export SCCACHE_GCS_BUCKET=$CACHE_GCS_BUCKET; export SCCACHE_GCS_RW_MODE=READ_WRITE; export SCCACHE_IDLE_TIMEOUT=0; mkdir artifacts; SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server; .ci/monolithic-windows.sh \"$WINDOWS_PROJECTS\" \"$WINDOWS_CHECK_TARGETS\" \"$WINDOWS_RUNTIMES\" \"$WINDOWS_RUNTIMES_CHECK_TARGETS\""

>From 83f700eb1193d6effa913c1d8dac0bc321c64053 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Mon, 17 Aug 2026 17:10:23 -0700
Subject: [PATCH 2/2] Fix typo

---
 .github/workflows/premerge.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 1d89f246d36ec..3b4a8a179128a 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -164,7 +164,7 @@ jobs:
       - name: Build and Test
         timeout-minutes: 180
         if: ${{ steps.vars.outputs.windows-projects != '' }}
-        shel: pwsh
+        shell: pwsh
         env:
           GITHUB_TOKEN: ${{ github.token }}
           GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}



More information about the llvm-commits mailing list