Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/sql_catalog_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,26 @@ jobs:
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: x64
# GitHub patches the Windows image roughly weekly via gradual rollouts, so
# back-to-back runs can hit different cl.exe builds. sccache keys on the compiler,
# so a shared key would miss after each bump; the version keeps caches separate.
# Non-Windows legs get an empty suffix, leaving their keys unchanged.
- name: Resolve MSVC version for sccache key
if: ${{ startsWith(matrix.runs-on, 'windows') }}
shell: pwsh
run: |
$PSNativeCommandUseErrorActionPreference = $false
$banner = (cl.exe 2>&1 | Out-String)
if ($banner -match 'Version ([\d.]+)') {
$suffix = "-$($Matches[1])"
} else {
# The key is only a cache hint, so degrade to a shared bucket rather than
# fail the build; the warning flags that the parse needs fixing.
$suffix = '-unknown'
Write-Host "::warning::could not parse cl.exe version for sccache key, using '$suffix'; banner was: $banner"
}
Add-Content -Path $env:GITHUB_ENV -Value "SCCACHE_KEY_SUFFIX=$suffix"
Write-Host "SCCACHE_KEY_SUFFIX=$suffix"
- name: Install dependencies on Ubuntu
if: ${{ startsWith(matrix.runs-on, 'ubuntu') }}
shell: bash
Expand All @@ -99,9 +119,9 @@ jobs:
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-sqlcatalog-${{ matrix.runs-on }}-${{ github.run_id }}
key: sccache-sqlcatalog-${{ matrix.runs-on }}${{ env.SCCACHE_KEY_SUFFIX }}-${{ github.run_id }}
restore-keys: |
sccache-sqlcatalog-${{ matrix.runs-on }}-
sccache-sqlcatalog-${{ matrix.runs-on }}${{ env.SCCACHE_KEY_SUFFIX }}-
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- name: Configure Iceberg
Expand Down Expand Up @@ -129,7 +149,7 @@ jobs:
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-sqlcatalog-${{ matrix.runs-on }}-${{ github.run_id }}
key: sccache-sqlcatalog-${{ matrix.runs-on }}${{ env.SCCACHE_KEY_SUFFIX }}-${{ github.run_id }}
- name: Run SQL catalog tests
shell: bash
run: ctest --test-dir build -R '^sql_catalog_test$' --output-on-failure -C ${{ matrix.cmake_build_type }}
24 changes: 21 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,24 @@ jobs:
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
arch: x64
# GitHub patches the Windows image roughly weekly via gradual rollouts, so
# back-to-back runs can hit different cl.exe builds. sccache keys on the compiler,
# so a shared key would miss after each bump; the version keeps caches separate.
- name: Resolve MSVC version for sccache key
shell: pwsh
run: |
$PSNativeCommandUseErrorActionPreference = $false
$banner = (cl.exe 2>&1 | Out-String)
if ($banner -match 'Version ([\d.]+)') {
$msvc = $Matches[1]
} else {
# The key is only a cache hint, so degrade to a shared bucket rather than
# fail the build; the warning flags that the parse needs fixing.
$msvc = 'unknown'
Write-Host "::warning::could not parse cl.exe version for sccache key, using '$msvc'; banner was: $banner"
}
Add-Content -Path $env:GITHUB_ENV -Value "MSVC_VER=$msvc"
Write-Host "Resolved MSVC_VER=$msvc"
- name: Cache vcpkg packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: vcpkg-cache
Expand All @@ -159,9 +177,9 @@ jobs:
uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-test-windows-${{ github.run_id }}
key: sccache-test-windows-${{ env.MSVC_VER }}-${{ github.run_id }}
restore-keys: |
sccache-test-windows-
sccache-test-windows-${{ env.MSVC_VER }}-
- name: Setup sccache
uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10
- name: Build Iceberg
Expand All @@ -176,7 +194,7 @@ jobs:
uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ github.workspace }}/.sccache
key: sccache-test-windows-${{ github.run_id }}
key: sccache-test-windows-${{ env.MSVC_VER }}-${{ github.run_id }}
- name: Build Example
shell: pwsh
run: |
Expand Down
Loading