diff --git a/.gitlab/dockerfiles/Dockerfile.windows b/.gitlab/dockerfiles/Dockerfile.windows deleted file mode 100644 index 064e5266..00000000 --- a/.gitlab/dockerfiles/Dockerfile.windows +++ /dev/null @@ -1,10 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2022 - -SHELL ["powershell", "-Command"] - -# download and install vs build tools needed by vcpkg -RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vs_buildtools.exe" \ - -OutFile "%TEMP%\vs_buildtools.exe" -UseBasicParsing -RUN "%TEMP%\vs_buildtools.exe" --quiet --wait --norestart --noUpdateInstaller \ - --add Microsoft.VisualStudio.Workload.VCTools \ - --includeRecommended diff --git a/.gitlab/pipeline/build-windows.yml b/.gitlab/pipeline/build-windows.yml index c99180f5..14c22459 100644 --- a/.gitlab/pipeline/build-windows.yml +++ b/.gitlab/pipeline/build-windows.yml @@ -1,7 +1,7 @@ build:windows: stage: build tags: - - windows + - saas-windows-medium-amd64 rules: # on default branch - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH @@ -15,13 +15,8 @@ build:windows: - Start-Service -Name "docker" - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - - docker build - --pull - --cache-from $CI_REGISTRY_IMAGE:latest - --tag $CI_REGISTRY_IMAGE:windows_$CI_COMMIT_SHA - -f .gitlab\dockerfiles\Dockerfile.windows - . - - docker push $CI_REGISTRY_IMAGE:windows_$CI_COMMIT_SHA + - docker build --tag foo -f Dockerfile.windows . + - docker push foo after_script: - docker logout $CI_REGISTRY diff --git a/Dockerfile.windows b/Dockerfile.windows new file mode 100644 index 00000000..007fb015 --- /dev/null +++ b/Dockerfile.windows @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +SHELL ["powershell", "-Command"] + +# download and install vs build tools needed by vcpkg +RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vs_buildtools.exe" \ + -OutFile "%TEMP%\vs_buildtools.exe" -UseBasicParsing +RUN "%TEMP%\vs_buildtools.exe" --quiet --wait --norestart --noUpdateInstaller \ + --add Microsoft.VisualStudio.Workload.VCTools \ + --includeRecommended + +# install vcpkg +RUN $Env:VCPKG_INSTALL_DIR = "c:\\vcpkg" +RUN git clone https://github.com/microsoft/vcpkg $Env:VCPKG_INSTALL_DIR && \ + cd $Env:VCPKG_INSTALL_DIR && \ + bootstrap-vcpkg.bat +RUN vcpkg install cgal boost-program-options boost-timer boost-test + +# build sfcgal +- cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$Env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake"