From ecf0aab0aea76d03b3516dbac20843759308ffee Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Fri, 14 Mar 2025 16:46:52 +0000 Subject: [PATCH] Remove use of Docker for Windows pipelines. --- .../cibuildwheel_windows.gitlab-ci.yml | 34 +++++++++---------- .gitlab/ci/windows_cpp.gitlab-ci.yml | 12 +++---- .gitlab/ci/windows_python.gitlab-ci.yml | 4 +-- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml b/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml index 331bb36..ae371b2 100644 --- a/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml +++ b/.gitlab/ci/release/cibuildwheel_windows.gitlab-ci.yml @@ -3,19 +3,19 @@ include: release:pip:windows: extends: .release:pip:template - image: mcr.microsoft.com/powershell:latest + # image: mcr.microsoft.com/powershell:latest tags: - windows # temporary rules until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/136 is closed - rules : - - when : never + rules : + - when : never # - if: $CI_COMMIT_BRANCH == "main" # Only run on the main branch # - if: $CI_COMMIT_TAG # Or if a tag is pushed # - if: $CI_COMMIT_BRANCH == "dev" # Allow manual runs on the dev branch # when: manual - needs: + needs: - build:windows_python parallel: @@ -36,18 +36,18 @@ release:pip:windows: # # Install dependencies # - choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y # - choco install git -Y - # - choco install python --version=$python_version -Y + # - choco install python --version=$python_version -Y # # Update PATH # - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") # - python -m pip install cibuildwheel==2.17.0 # # Download repositories # - $DEPENDENCY_JOB="build:windows_python" - # - !reference [.windows:download:repositories, before_script] + # - !reference [.windows:download:repositories, before_script] before_script: # Install Chocolatey - Set-ExecutionPolicy Bypass -Scope Process -Force - iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - + # Install dependencies - choco install visualstudio2022buildtools -y - choco install cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y @@ -56,33 +56,33 @@ release:pip:windows: # Install NuGet provider - Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force - + # Set up Visual Studio environment - Install-Module VSSetup -Scope CurrentUser -Force -ErrorAction SilentlyContinue - Import-Module VSSetup - + - $vsInstance = Get-VSSetupInstance | Select-VSSetupInstance - + # Explicit Visual Studio setup - $vsPath = "C:\Program Files\Microsoft Visual Studio\2022\BuildTools" - $env:VSINSTALLDIR = $vsPath - $env:VCINSTALLDIR = "${vsPath}\VC" - + # Set CMake generator explicitly - $env:CMAKE_GENERATOR = "Visual Studio 17 2022" - $env:CMAKE_PREFIX_PATH = $vsPath - $env:WindowsSDKDir = "C:\Program Files (x86)\Windows Kits\10" - + - $env:Path = "${vsPath}\Common7\IDE;${vsPath}\Common7\Tools;${env:Path}" - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") - + # Install cibuildwheel - py -m pip install cibuildwheel==2.22.0 - + # Download repositories - $DEPENDENCY_JOB="build:windows_python" - - !reference [.windows:download:repositories, before_script] - + - !reference [.windows:download:repositories, before_script] + script: - $env:CMAKE_GENERATOR = "Visual Studio 17 2022" - python -m cibuildwheel --output-dir wheelhouse --platform windows @@ -90,7 +90,7 @@ release:pip:windows: # deploy:pip:windows: # allow_failure: true # temporary rules until https://gitlab.eclipse.org/eclipse/aidge/aidge/-/issues/136 is closed -# extends: +# extends: # - .deploy:pip:windows:template # rules: # - if: $CI_COMMIT_TAG # Deploy only for tagged commits diff --git a/.gitlab/ci/windows_cpp.gitlab-ci.yml b/.gitlab/ci/windows_cpp.gitlab-ci.yml index 6a3a04a..1d44112 100644 --- a/.gitlab/ci/windows_cpp.gitlab-ci.yml +++ b/.gitlab/ci/windows_cpp.gitlab-ci.yml @@ -6,12 +6,12 @@ include: build:windows_cpp: stage: build needs: [] - extends: .build:variable:aidge_install + extends: .build:variable:aidge_install rules: - allow_failure: false tags: - windows - image: buildtools + #image: buildtools before_script: # Install Chocolatey @@ -32,11 +32,11 @@ build:windows_cpp: Write-Host "Build directory: $env:BUILD_DIR" $SOURCE_PATH = $PWD $BUILD_PATH = Join-Path $SOURCE_PATH $env:BUILD_DIR - + # Create build directory New-Item -ItemType Directory -Force -Path $BUILD_PATH Set-Location $BUILD_PATH - + # Configure with CMake cmake -DCMAKE_BUILD_TYPE=Release ` -DTESTS=ON ` @@ -63,8 +63,8 @@ test:windows_cpp: - allow_failure: false tags: - windows - image: buildtools - extends: .build:variable:aidge_install + # image: buildtools + extends: .build:variable:aidge_install 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')) diff --git a/.gitlab/ci/windows_python.gitlab-ci.yml b/.gitlab/ci/windows_python.gitlab-ci.yml index 5a2554a..ea79eb5 100644 --- a/.gitlab/ci/windows_python.gitlab-ci.yml +++ b/.gitlab/ci/windows_python.gitlab-ci.yml @@ -11,7 +11,7 @@ build:windows_python: needs: [] tags: - windows - image: buildtools + # image: buildtools before_script: # Install Chocolatey @@ -31,7 +31,7 @@ build:windows_python: - virtualenv venv - venv\Scripts\Activate.ps1 - python -m pip install . -v - + artifacts: expire_in: 3 days paths: -- GitLab