From fc43a3a643926465cae1d0f8aa22dc8b07999fb4 Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Fri, 5 Jun 2026 21:28:54 +0200 Subject: [PATCH] fix(ci): use Windows Swift setup action --- .github/workflows/ci.yml | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a54edc..44f6374 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,26 +53,10 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Swift - shell: pwsh - run: | - $swift = Get-Command swift -ErrorAction SilentlyContinue - if (-not $swift) { - winget install --id Swift.Toolchain --exact --source winget --accept-source-agreements --accept-package-agreements --disable-interactivity - $roots = @( - "$env:ProgramFiles\Swift", - "${env:ProgramFiles(x86)}\Swift" - ) | Where-Object { $_ -and (Test-Path $_) } - $swift = $roots | - ForEach-Object { Get-ChildItem -Path $_ -Recurse -Filter swift.exe -ErrorAction SilentlyContinue } | - Select-Object -First 1 - if (-not $swift) { - throw "Swift executable not found after WinGet installation" - } - $bin = $swift.Directory.FullName - Add-Content -Path $env:GITHUB_PATH -Value $bin - $env:Path = "$bin;$env:Path" - } - swift --version + uses: compnerd/gha-setup-swift@main + with: + swift-version: swift-6.3.2-release + swift-build: 6.3.2-RELEASE - name: Build and test shell: pwsh run: ./scripts/check-windows.ps1