Skip to content

Commit

Permalink
add windows ci setting
Browse files Browse the repository at this point in the history
using variables in powershell cmake is failed.
  • Loading branch information
yhmtsai committed Mar 4, 2020
1 parent c1ac9f4 commit 0d7faa1
Showing 1 changed file with 81 additions and 0 deletions.
81 changes: 81 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -799,3 +799,84 @@ new-issue-on-failure:
- develop
- master
dependencies: []


# The following are windows runner setting

# Gitlab windows virtual machine shared runner tag
.shared_windows_runners:
tags:
- shared-windows
- windows
- windows-1809

.windows_before_script_template: &windows_default_before_script
- $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.."
- Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
- choco install cmake -y --installargs '"ADD_CMAKE_TO_PATH=System"'
- refreshenv

.windows_ci_template: &windows_default_ci
stage: build
extends:
- .shared_windows_runners
# can not use rules and except together.
# use '$CI_PIPELINE_SOURCE == "schedule"' to do except: - schedule
# run pipeline automatically on master/develop but manually on other branches.
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
when: never
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_REF_NAME != "develop"'
when: manual
- when: on_success
before_script: *windows_default_before_script
dependencies: []

# Windows runner does not contain nvidia device
# Only compile cuda and reference.
compile/cuda102/msvc2019/cuda/release/shared:
<<: *windows_default_ci
before_script:
- *windows_default_before_script
- curl.exe -L https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_441.22_win10.exe --output cuda_installer.exe
- 7z x cuda_installer.exe -o"cuda_installer"
- Start-Process -FilePath ".\cuda_installer\setup.exe" -ArgumentList "-s nvcc_10.2 cublas_10.2 cublas_dev_10.2 cudart_10.2 curand_10.2 curand_dev_10.2 cusolver_10.2 cusolver_dev_10.2 cusparse_10.2 cusparse_dev_10.2" -Wait -NoNewWindow
- echo $?
- copy "cuda_installer\CUDAVisualStudioIntegration\extras\visual_studio_integration\MSBuildExtensions\*.*" "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\BuildCustomizations"
- $env:PATH="$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;$env:PATH"
- $env:CUDA_PATH="$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v10.2"
- $env:CUDA_PATH_V10_2="$env:ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v10.2"
- Remove-Item –path cuda_installer –recurse
- Remove-Item cuda_installer.exe
script:
- mkdir build
- cd build
- $env:PATH="$pwd\windows_shared_library;$env:PATH"
- cmake -DGINKGO_BUILD_EXAMPLES=ON -DGINKGO_BUILD_TESTS=ON
-DGINKGO_DEVEL_TOOLS=OFF -DGINKGO_BUILD_OMP=OFF -DGINKGO_BUILD_HIP=OFF
-DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_CUDA=ON ..
- cmake --build . --config Release

build/nocuda/msvc2019/ref/release/shared:
<<: *windows_default_ci
script:
- mkdir build
- cd build
- $env:PATH="$pwd\windows_shared_library;$env:PATH"
- cmake -DGINKGO_BUILD_EXAMPLES=ON -DGINKGO_BUILD_TESTS=ON
-DGINKGO_DEVEL_TOOLS=OFF -DGINKGO_BUILD_OMP=OFF -DGINKGO_BUILD_HIP=OFF
-DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_CUDA=OFF ..
- cmake --build . --config Release
- ctest . -C Release

build/nocuda/msvc2019/ref/debug/static:
<<: *windows_default_ci
script:
- mkdir build
- cd build
- $env:CXXFLAGS="/bigobj"
- cmake -DGINKGO_BUILD_EXAMPLES=ON -DGINKGO_BUILD_TESTS=ON
-DGINKGO_DEVEL_TOOLS=OFF -DGINKGO_BUILD_OMP=OFF -DGINKGO_BUILD_HIP=OFF
-DBUILD_SHARED_LIBS=OFF -DGINKGO_BUILD_CUDA=OFF ..
- cmake --build . --config Debug
- ctest . -C Debug

0 comments on commit 0d7faa1

Please sign in to comment.