winmd-inspect: disambiguate colliding names with fabricated namespaces #1601
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: windows | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| actions: write | |
| contents: read | |
| concurrency: | |
| group: ${{ format('{0}-{1}', github.workflow, github.ref) }} | |
| cancel-in-progress: true | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| env: | |
| # Keep the shared cache quick to restore and small enough to replace often. | |
| LLVM_CAS_MAX_SIZE_BYTES: 536870912 # 512 MiB | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - branch: development | |
| tag: DEVELOPMENT-SNAPSHOT-2026-05-04-a | |
| steps: | |
| - uses: compnerd/gha-setup-swift@main | |
| with: | |
| swift-build: ${{ matrix.tag }} | |
| swift-version: ${{ matrix.branch }} | |
| - uses: actions/checkout@v7.0.0 | |
| - name: Configure LLVM CAS cache | |
| shell: pwsh | |
| run: | | |
| $path = [IO.Path]::Join("${{ github.workspace }}", ".build", "llvm-cas") | |
| "SWIFT_CAS_PATH=$path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| $prefix = "llvm-cas-${{ runner.os }}-" | |
| $key = "{0}{1}-{2}" -f $prefix, "${{ matrix.tag }}", "${{ hashFiles('Package.resolved') }}" | |
| "LLVM_CAS_CACHE_PREFIX=$prefix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| "LLVM_CAS_CACHE_KEY=$key" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
| - name: Restore LLVM CAS | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ env.SWIFT_CAS_PATH }} | |
| key: ${{ env.LLVM_CAS_CACHE_KEY }} | |
| - name: Build | |
| run: >- | |
| swift build --quiet | |
| -Xswiftc -explicit-module-build | |
| -Xswiftc -cache-compile-job | |
| -Xswiftc -cas-path | |
| -Xswiftc $env:SWIFT_CAS_PATH | |
| env: | |
| AR: llvm-ar | |
| - name: Run tests | |
| run: >- | |
| swift test --quiet --disable-xctest | |
| -Xswiftc -explicit-module-build | |
| -Xswiftc -cache-compile-job | |
| -Xswiftc -cas-path | |
| -Xswiftc $env:SWIFT_CAS_PATH | |
| - name: Build SwiftSQL | |
| run: >- | |
| swift build --quiet --package-path SwiftSQL | |
| -Xswiftc -explicit-module-build | |
| -Xswiftc -cache-compile-job | |
| -Xswiftc -cas-path | |
| -Xswiftc $env:SWIFT_CAS_PATH | |
| env: | |
| AR: llvm-ar | |
| - name: Run SwiftSQL tests | |
| run: >- | |
| swift test --quiet --disable-xctest --package-path SwiftSQL | |
| -Xswiftc -explicit-module-build | |
| -Xswiftc -cache-compile-job | |
| -Xswiftc -cas-path | |
| -Xswiftc $env:SWIFT_CAS_PATH | |
| - name: Prune LLVM CAS | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| shell: pwsh | |
| run: | | |
| $script = [IO.Path]::Join("${{ github.workspace }}", ".github", "scripts", "Prune-SwiftCAS.ps1") | |
| & $script -Path $env:SWIFT_CAS_PATH -SizeLimit ([int64]$env:LLVM_CAS_MAX_SIZE_BYTES) | |
| - name: Remove previous LLVM CAS cache | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| $caches = @(gh cache list --key $env:LLVM_CAS_CACHE_PREFIX --limit 10000 --json id | ConvertFrom-Json) | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| foreach ($cache in $caches) { | |
| gh cache delete $cache.id --repo $env:GITHUB_REPOSITORY | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| } | |
| - name: Save LLVM CAS | |
| if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ env.SWIFT_CAS_PATH }} | |
| key: ${{ env.LLVM_CAS_CACHE_KEY }} |