diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml
index f7747e55800bab4d53a61cd1e3f340b2137687ae..ec8952874918e04f3453e8478c93f3a161c6ce01 100644
--- a/.gitlab/ci/build.gitlab-ci.yml
+++ b/.gitlab/ci/build.gitlab-ci.yml
@@ -40,9 +40,11 @@ build:windows_cpp:
 
   image: buildtools
   before_script:
-    # Install CMake
-    - Invoke-WebRequest -UseBasicParsing "https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4-windows-x86_64.msi" -o cmake-3.27.4-windows-x86_64.msi
-    - Start-Process -Wait -FilePath MsiExec.exe -ArgumentList '/i cmake-3.27.4-windows-x86_64.msi ADD_CMAKE_TO_PATH=System /qn'
+    # Install Chocolatey
+    - [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
     # Update PATH
     - $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
   script: