From c13e123698fd9dfc7c8cf20341c2e421e0e54708 Mon Sep 17 00:00:00 2001 From: Maxence Naud <maxence.naud@cea.fr> Date: Mon, 15 Jan 2024 13:48:12 +0000 Subject: [PATCH] Windows compilation in build.gitlab-ci.yml is back --- .gitlab/ci/build.gitlab-ci.yml | 114 ++++++++++++++++----------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 8d896c8ec..a4579e295 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -95,60 +95,60 @@ build:ubuntu_python: paths: - venv/ -# build:windows_cpp: -# stage: build -# needs: [] -# tags: -# - windows - -# image: buildtools -# 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 cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y -# - choco install git -Y -# - choco install python -Y -# # Update PATH -# - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") -# script: -# - mkdir -p build_cpp -# - mkdir -p install_cpp -# - cd build_cpp -# - cmake -DCMAKE_INSTALL_PREFIX:PATH=../install_cpp -DCMAKE_BUILD_TYPE=Debug .. -# - cmake --build . -j2 -# - cmake --install . --config Debug - -# artifacts: -# expire_in: 1 week -# paths: -# - build_cpp/ -# - install_cpp/ - -# build:windows_python: -# stage: build -# needs: [] -# tags: -# - windows - -# image: buildtools -# 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 cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y -# - choco install git -Y -# - choco install python -Y -# # Update PATH -# - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") -# script: -# - python -m pip install virtualenv -# - virtualenv venv -# - venv\Scripts\Activate.ps1 -# # Numpy dependancy for unit test -# - python -m pip install -r requirements.txt -# - python -m pip install . -# artifacts: -# expire_in: 1 week -# paths: -# - venv/ +build:windows_cpp: + stage: build + needs: [] + tags: + - windows + + image: buildtools + 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 cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y + - choco install git -Y + - choco install python -Y + # Update PATH + - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + script: + - mkdir -p build_cpp + - mkdir -p install_cpp + - cd build_cpp + - cmake -DCMAKE_INSTALL_PREFIX:PATH=../install_cpp -DCMAKE_BUILD_TYPE=Debug .. + - cmake --build . -j2 + - cmake --install . --config Debug + + artifacts: + expire_in: 1 week + paths: + - build_cpp/ + - install_cpp/ + +build:windows_python: + stage: build + needs: [] + tags: + - windows + + image: buildtools + 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 cmake.install --installargs '"ADD_CMAKE_TO_PATH=System"' -Y + - choco install git -Y + - choco install python -Y + # Update PATH + - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") + script: + - python -m pip install virtualenv + - virtualenv venv + - venv\Scripts\Activate.ps1 + # Numpy dependancy for unit test + - python -m pip install -r requirements.txt + - python -m pip install . + artifacts: + expire_in: 1 week + paths: + - venv/ -- GitLab