Skip to content

Commit

Permalink
foo
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitjano committed Apr 26, 2024
1 parent cb21428 commit 386c513
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
10 changes: 0 additions & 10 deletions .gitlab/dockerfiles/Dockerfile.windows

This file was deleted.

11 changes: 6 additions & 5 deletions .gitlab/pipeline/build-windows.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -12,15 +12,16 @@ build:windows:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: manual
before_script:
- Start-Service -Name "docker"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- (docker pull $CI_REGISTRY_IMAGE:latest) -or (1 -eq 1)
- docker build
--pull
--cache-from $CI_REGISTRY_IMAGE:latest
--tag $CI_REGISTRY_IMAGE:windows_$CI_COMMIT_SHA
-f .gitlab/dockerfiles/Dockerfile.windows
--tag foo
-f Dockerfile.windows
.
- docker push $CI_REGISTRY_IMAGE:windows_$CI_COMMIT_SHA
- docker push foo
after_script:
- docker logout $CI_REGISTRY

Expand Down
30 changes: 30 additions & 0 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM mcr.microsoft.com/windows/servercore:ltsc2022

SHELL ["powershell", "-Command"]

RUN $env:starter_path = Get-Location

# download and install vs build tools needed by vcpkg
RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vs_buildtools.exe" \
-OutFile "$env:TEMP\vs_buildtools.exe" -UseBasicParsing
RUN Start-Process -FilePath "$env:TEMP\vs_buildtools.exe" \
-ArgumentList "--wait", "--nocache", "--norestart", "--noUpdateInstaller", \
"--add", "Microsoft.VisualStudio.Workload.VCTools", "--includeRecommended" -Wait

# install vcpkg
RUN $env:VCPKG_INSTALL_DIR = "c:\\vcpkg"
RUN $env:VCPKG_DEFAULT_TRIPLET="x64-windows"
RUN git clone https://github.com/microsoft/vcpkg $env:VCPKG_INSTALL_DIR && \
cd $env:VCPKG_INSTALL_DIR && \
bootstrap-vcpkg.bat -disableMetrics && \
.\vcpkg install cgal boost-program-options boost-timer boost-test

# build sfcgal
RUN cd $env:starter_path && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake"

# Restore default shell for Windows containers.
SHELL ["cmd.exe", "/s", "/c"]

# Default to PowerShell if no other command specified.
CMD ["powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]

0 comments on commit 386c513

Please sign in to comment.