diff --git a/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml b/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml index e09fca896b1f0a7dbb053b62fea1d9bb7b52838f..70819835423a8c01657140b9d1522bcea683236a 100644 --- a/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml +++ b/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml @@ -44,19 +44,24 @@ release:pip:windows: before_script: # Install Chocolatey - Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - # # Install dependencies - - choco install python -y --version 3.12.4 + # Install dependencies + - choco install visualstudio2022buildtools -y --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x64" - choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y - - choco install visualstudio2022buildtools -y --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools" - choco install git.install -y + - choco install python -y - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + # Explicitly set up Visual Studio environment + - $vsPath = vswhere -latest -property installationPath + - Import-Module "$vsPath\Common7\Tools\Microsoft.VisualStudio.DevShell.dll" + - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation - py -m pip install cibuildwheel==2.22.0 # Download repositories - $DEPENDENCY_JOB="build:windows_python" - !reference [.windows:download:repositories, before_script] script: - - python -m cibuildwheel --output-dir wheelhouse --platform windows + - $env:CMAKE_GENERATOR = "NMake Makefiles" + - python -m cibuildwheel --output-dir wheelhouse --platform windows --verbose deploy:pip:windows: