From f7f3a450c9d22ff387faea72df8796d735c0573e Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Sun, 4 Oct 2026 17:08:26 +0000 Subject: [PATCH] CI: build Windows wheels outside %WINDIR% Windows runners run as SYSTEM with the workspace under C:\Windows\System32\config\systemprofile. cl.exe is 32-bit, so WOW64 file redirection sends its System32 access to SysWOW64 and it cannot see the checked-out sources (C1083: aegis.h not found), while 64-bit processes (git, python) see them fine. Move the Windows checkout/build to C:\aeg-build. --- .gitea/workflows/release.yaml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 7864542..291a169 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -25,22 +25,44 @@ jobs: # accounts) and powershell hits the script execution policy under SYSTEM. # --recursive pulls in the libaegis submodule needed by the build backend. - name: Checkout + if: matrix.os != 'windows' shell: ${{ matrix.shell }} run: | git clone --recursive "${{ gitea.server_url }}/${{ gitea.repository }}.git" . git checkout -f "${{ gitea.sha }}" + # Windows runners execute as SYSTEM with the workspace under + # C:\Windows\System32\config\systemprofile. cl.exe is a 32-bit binary, + # so WOW64 redirects its file access to SysWOW64 and it cannot see the + # sources (C1083: aegis.h not found). Build from a path outside %WINDIR%. + - name: Checkout + if: matrix.os == 'windows' + shell: cmd + run: | + if exist C:\aeg-build rmdir /s /q C:\aeg-build + git clone --recursive "${{ gitea.server_url }}/${{ gitea.repository }}.git" C:\aeg-build + cd /d C:\aeg-build + git checkout -f "${{ gitea.sha }}" + # Builds sdist + all wheel variants for this platform, runs tests and # benchmarks, leaves everything in dist/. Upload is left to publish-pypi. - name: Build wheels for this platform + if: matrix.os != 'windows' shell: ${{ matrix.shell }} run: uv run tools/release.py --no-upload + - name: Build wheels for this platform + if: matrix.os == 'windows' + shell: cmd + run: | + cd /d C:\aeg-build + uv run tools/release.py --no-upload + - name: Upload wheels as artifact uses: actions/upload-artifact@v4 with: name: dist-${{ matrix.os }} - path: dist/ + path: ${{ matrix.os == 'windows' && 'C:\aeg-build\dist\' || 'dist/' }} retention-days: 1 # Publish to PyPI only once every platform's wheel build has succeeded.