Skip to content

Commit

Permalink
Update LSP Test CI, use pwsh to remove all g++/clang++ in PATH instea…
Browse files Browse the repository at this point in the history
…d of hardcode

After GitHub bumped its Windows Actions runner image, our LSP CI is failing, because Chololatey doesn't have g++ anymore. While the runner image is an absolute disaster (refusal to remove Strawberry Perl being one, see actions/runner-images#5459), we still need to use it, and thus still need to come up with a more robust way of uninstalling g++/clang++.

This commit removes hardcoded g++ locations, instead it uses `Get-Command` in powershell to locate `g++` and delete all of them.
  • Loading branch information
axmmisaka authored Oct 19, 2023
1 parent 7af2e84 commit df91be0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
run: brew uninstall --ignore-dependencies gcc
if: ${{ runner.os == 'macOS' }}
- name: Uninstall packages Windows
shell: pwsh
run: |
del "C:\ProgramData\Chocolatey\bin\g++.exe"
del "C:\Strawberry\c\bin\g++.exe"
del "C:\Program Files\LLVM\bin\clang++.exe"
try { $exes=Get-Command "g++" -All; $exes | Remove-Item; } catch { "There is no g++ present in pwsh PATH." }
try { $exes=Get-Command "clang++" -All; $exes | Remove-Item; } catch { "There is no clang++ present in pwsh PATH." }
if: ${{ runner.os == 'Windows' }}
- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand Down

0 comments on commit df91be0

Please sign in to comment.