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.
This commit is contained in:
1 parent
696b35eb6f
commit
f7f3a450c9
1 file changed
+23
-1
@@ -25,22 +25,44 @@ jobs:
|
|||||||
# accounts) and powershell hits the script execution policy under SYSTEM.
|
# accounts) and powershell hits the script execution policy under SYSTEM.
|
||||||
# --recursive pulls in the libaegis submodule needed by the build backend.
|
# --recursive pulls in the libaegis submodule needed by the build backend.
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
if: matrix.os != 'windows'
|
||||||
shell: ${{ matrix.shell }}
|
shell: ${{ matrix.shell }}
|
||||||
run: |
|
run: |
|
||||||
git clone --recursive "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
git clone --recursive "${{ gitea.server_url }}/${{ gitea.repository }}.git" .
|
||||||
git checkout -f "${{ gitea.sha }}"
|
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
|
# Builds sdist + all wheel variants for this platform, runs tests and
|
||||||
# benchmarks, leaves everything in dist/. Upload is left to publish-pypi.
|
# benchmarks, leaves everything in dist/. Upload is left to publish-pypi.
|
||||||
- name: Build wheels for this platform
|
- name: Build wheels for this platform
|
||||||
|
if: matrix.os != 'windows'
|
||||||
shell: ${{ matrix.shell }}
|
shell: ${{ matrix.shell }}
|
||||||
run: uv run tools/release.py --no-upload
|
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
|
- name: Upload wheels as artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist-${{ matrix.os }}
|
name: dist-${{ matrix.os }}
|
||||||
path: dist/
|
path: ${{ matrix.os == 'windows' && 'C:\aeg-build\dist\' || 'dist/' }}
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
# Publish to PyPI only once every platform's wheel build has succeeded.
|
# Publish to PyPI only once every platform's wheel build has succeeded.
|
||||||
|
|||||||
Reference in new issue
Block a user