diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 0f19664..e11b8e7 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -15,13 +15,40 @@ jobs: strategy: matrix: # macos-13 is pre-ARM - os: [ ubuntu-24.04, windows-2019, macos-13, macos-latest ] + os: [ ubuntu-24.04, windows-2022, macos-13, macos-latest ] steps: - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Patch chrono usage + if: matrix.os == 'windows-2022' + shell: pwsh + run: | + $f = "src/pytsql/grammar/cpp_src/antlr4-cpp-runtime/atn/ProfilingATNSimulator.cpp" + if (!(Get-Content $f | Select-String -SimpleMatch "")) { + (Get-Content $f) | Set-Content $f # touch to ensure CRLF normalized + Add-Content -Path $f -Value "" # no-op; optional + # insert include at top (after existing includes) + $lines = Get-Content $f + $idx = ($lines | Select-String -Pattern "^\s*#include\s+").Count + $out = @() + $injected = $false + foreach ($line in $lines) { + if (-not $injected -and $line -match "^\s*#include\s+") { + $out += $line + continue + } + if (-not $injected) { + $out += "#include " + $injected = $true + } + $out += $line + } + $out | Set-Content $f + } + - name: Build wheels uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # v2.23.3 env: