Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f31a14c
Add Windows CI (MSVC + clang-cl) with dependency caching
wavefunction91 Jun 27, 2026
71090ad
Windows CI: build only external dep targets in the deps job
wavefunction91 Jun 27, 2026
e09b445
Windows CI: fix libint2 dep target name (int2 -> libint2)
wavefunction91 Jun 27, 2026
5d06ea4
Disable libint2 CMake Unity build on MSVC
wavefunction91 Jun 27, 2026
24ee9f7
Windows CI: resumable dependency cache + uncapped parallelism
wavefunction91 Jun 28, 2026
2d03cef
Windows CI: fix partial-cache save being skipped on build timeout
wavefunction91 Jun 28, 2026
4c7b87c
Windows CI: trigger resume run (empty commit)
wavefunction91 Jun 28, 2026
67b83cc
Windows CI: memory-aware build parallelism to avoid MSVC C1060
wavefunction91 Jun 28, 2026
2573838
Windows CI: exclude libint2's own unit tests from ctest
wavefunction91 Jun 28, 2026
2244b83
Windows CI: switch to production triggers
wavefunction91 Jun 28, 2026
5d3ef4c
Merge branch 'main' into session/win_ci_cd
lorisercole Jun 29, 2026
1fee3b2
Switch Windows CI to windows-2025-16core, 12h deps timeout
lorisercole Jun 29, 2026
d44218f
Add agency.toml to .gitignore
lorisercole Jun 29, 2026
fa40ccd
try 32 core
lorisercole Jun 29, 2026
94ccf28
swtich to 1ES GH runners
lorisercole Jun 29, 2026
5cf0545
ci: add Windows ADO pip-wheel pipeline with shared conda bootstrap
lorisercole Jun 29, 2026
959d690
install vcpkg if not pre-installed
lorisercole Jun 29, 2026
6648509
ci(windows): bootstrap vcpkg and fix VCPKG_ROOT in env setup step
lorisercole Jun 29, 2026
4f29fdf
Apply suggestions from code review
lorisercole Jun 29, 2026
864283b
ci(windows): switch ADO wheel pipeline from clang-cl to MSVC cl
lorisercole Jun 29, 2026
050dece
fix(ci): fix two GHA Windows deps job failures
lorisercole Jun 29, 2026
0f90648
fix(ci/ado): switch powershell->pwsh tasks and fix PS5 compat in Wind…
lorisercole Jun 29, 2026
638284b
fix(ci): use libint2_obj target; add windowsOnly ADO param
lorisercole Jun 29, 2026
45bda0b
Add rebuild_dep_cache manual trigger to GHA workflows [skip ci]
lorisercole Jun 29, 2026
81d7f27
Use Terrapin mirror for vcpkg asset caching on 1ES Windows runner
lorisercole Jun 29, 2026
9a66695
Remove x-block-origin from Terrapin asset source
lorisercole Jun 29, 2026
565b6af
Skip CMake reconfigure when partial build cache is restored
lorisercole Jun 29, 2026
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
109 changes: 109 additions & 0 deletions .github/actions/windows-msvc-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Set up Windows MSVC / clang-cl environment
description: >
Import the Visual Studio x64 developer environment (vcvarsall) into the job so
cl/clang-cl/ninja and the MSVC headers and libraries are available to later
steps. Exposes the resolved C++ compiler path and the MSVC toolset version for
use in cache keys.

inputs:
compiler:
description: Compiler to set up - "msvc" (cl) or "clang-cl".
required: true

outputs:
toolset:
description: MSVC toolset version (stable identifier for cache keys).
value: ${{ steps.setup.outputs.toolset }}
cxx-path:
description: Full path to the resolved C++ compiler.
value: ${{ steps.setup.outputs.cxx-path }}

runs:
using: composite
steps:
- id: setup
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'

$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
if (-not (Test-Path $vswhere)) { throw "vswhere not found at $vswhere" }
$vsPath = & $vswhere -latest -products * -property installationPath
if (-not $vsPath) { throw "No Visual Studio installation found" }
Write-Host "Visual Studio: $vsPath"

$vcvarsall = "$vsPath\VC\Auxiliary\Build\vcvarsall.bat"
if (-not (Test-Path $vcvarsall)) { throw "vcvarsall.bat not found at $vcvarsall" }

# Snapshot the environment, run vcvarsall x64, then diff to capture its changes.
$before = @{}
Get-ChildItem env: | ForEach-Object { $before[$_.Name] = $_.Value }

$tmp = [System.IO.Path]::GetTempFileName()
cmd /c "`"$vcvarsall`" x64 && set > `"$tmp`""
if ($LASTEXITCODE -ne 0) { throw "vcvarsall.bat failed with exit code $LASTEXITCODE" }
$after = @{}
Get-Content $tmp | ForEach-Object {
if ($_ -match '^([^=]+)=(.*)$') { $after[$matches[1]] = $matches[2] }
}
Remove-Item $tmp

# clang-cl is shipped with the VS LLVM component but is not added by vcvarsall.
$clangDir = $null
if ('${{ inputs.compiler }}' -eq 'clang-cl') {
$candidates = @(
"$vsPath\VC\Tools\Llvm\x64\bin\clang-cl.exe",
"$vsPath\VC\Tools\Llvm\bin\clang-cl.exe"
)
foreach ($c in $candidates) { if (Test-Path $c) { $clangDir = Split-Path $c; break } }
if (-not $clangDir) { throw "clang-cl.exe not found under $vsPath\VC\Tools\Llvm" }
}

# Apply to the current process so the compiler resolves within this step.
foreach ($name in $after.Keys) {
[System.Environment]::SetEnvironmentVariable($name, $after[$name], 'Process')
}
if ($clangDir) { $env:PATH = "$clangDir;$env:PATH" }

# Persist non-PATH changes to GITHUB_ENV and PATH additions to GITHUB_PATH.
foreach ($name in $after.Keys) {
if ($name -ieq 'Path') { continue }
if ($before[$name] -ne $after[$name]) {
"$name=$($after[$name])" >> $env:GITHUB_ENV
}
}
$beforePath = @($before['Path'] -split ';')
$newEntries = @($after['Path'] -split ';') | Where-Object { $_ -and ($beforePath -notcontains $_) }
if ($clangDir) { $clangDir >> $env:GITHUB_PATH }
foreach ($p in $newEntries) { $p >> $env:GITHUB_PATH }

# Resolve the compiler and a stable toolset version for cache keys.
if ('${{ inputs.compiler }}' -eq 'clang-cl') {
$cxx = (Get-Command clang-cl.exe -ErrorAction Stop).Source
} else {
$cxx = (Get-Command cl.exe -ErrorAction Stop).Source
}
Write-Host "C++ compiler: $cxx"
if ('${{ inputs.compiler }}' -eq 'clang-cl') { & $cxx --version 2>&1 | Write-Host }

$toolsetFile = "$vsPath\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"
$toolset = (Get-Content $toolsetFile -ErrorAction Stop | Select-Object -First 1).Trim()
Write-Host "MSVC toolset: $toolset"

"toolset=$toolset" >> $env:GITHUB_OUTPUT
"cxx-path=$cxx" >> $env:GITHUB_OUTPUT

# Bootstrap vcpkg if not pre-installed.
$vcpkgRoot = if ($env:VCPKG_INSTALLATION_ROOT) { $env:VCPKG_INSTALLATION_ROOT } else { 'C:\vcpkg' }
if (Test-Path "$vcpkgRoot\vcpkg.exe") {
Write-Host "vcpkg already available at $vcpkgRoot"
} else {
Write-Host "vcpkg not found — bootstrapping into $vcpkgRoot"
git clone https://github.com/microsoft/vcpkg.git $vcpkgRoot --depth 1
& "$vcpkgRoot\bootstrap-vcpkg.bat" -disableMetrics
if ($LASTEXITCODE -ne 0) { throw "vcpkg bootstrap failed ($LASTEXITCODE)" }
"VCPKG_INSTALLATION_ROOT=$vcpkgRoot" >> $env:GITHUB_ENV
}
# vcvarsall sets VCPKG_ROOT to VS's bundled copy; override it to match our
# standalone installation so vcpkg.exe doesn't warn about the mismatch.
"VCPKG_ROOT=$vcpkgRoot" >> $env:GITHUB_ENV
Loading