Add a windows10 vs2019 + shell builder

In a future merge request will test CUDA support on windows
This commit is contained in:
Robert Maynard 2020-04-21 16:22:22 -04:00
parent 1e5c19a285
commit b033b28efd
4 changed files with 107 additions and 2 deletions

@ -169,3 +169,4 @@ include:
- local: '/.gitlab/ci/rhel8.yml'
- local: '/.gitlab/ci/ubuntu1604.yml'
- local: '/.gitlab/ci/ubuntu1804.yml'
- local: '/.gitlab/ci/windows10.yml'

@ -74,10 +74,13 @@ if(DEFINED ENV{CTEST_MEMORYCHECK_SANITIZER_OPTIONS})
endif()
#We need to do write this information out to a file in the build directory
file(TO_CMAKE_PATH "${CTEST_SOURCE_DIRECTORY}" src_path) #converted so we can run on windows
file(TO_CMAKE_PATH "${CTEST_BINARY_DIRECTORY}" bin_path) #converted so we can run on windows
set(state
"
set(CTEST_SOURCE_DIRECTORY \"${CTEST_SOURCE_DIRECTORY}\")
set(CTEST_BINARY_DIRECTORY \"${CTEST_BINARY_DIRECTORY}\")
set(CTEST_SOURCE_DIRECTORY \"${src_path}\")
set(CTEST_BINARY_DIRECTORY \"${bin_path}\")
set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME})
set(CTEST_SITE ${CTEST_SITE})

@ -0,0 +1,14 @@
$tempFile = "$env:temp\vcvars.txt"
if ($env:CI_JOB_NAME -eq "build:windows_vs2019") {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > $tempFile"
} else {
cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > $tempFile"
}
Get-Content "$tempFile" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}

87
.gitlab/ci/windows10.yml Normal file

@ -0,0 +1,87 @@
.cmake_build_windows: &cmake_build_windows
stage: build
timeout: 2 hours
interruptible: true
before_script:
- .gitlab/ci/config/setup_vs_powershell.ps1
- "cmake --version"
- "cmake -V -P .gitlab/ci/config/gitlab_ci_setup.cmake"
- "ctest -VV -S .gitlab/ci/ctest_configure.cmake"
script:
- "ctest -VV -S .gitlab/ci/ctest_build.cmake"
artifacts:
expire_in: 24 hours
when: always
paths:
# The artifacts of the build.
- build/bin/
- build/include/
- build/lib/
# CTest and CMake install files.
# XXX(globbing): Can be simplified with support from
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
#
# Note: this also captures our CIState.cmake file
- build/CMakeCache.txt
- build/*.cmake
- build/*/*.cmake
- build/*/*/*.cmake
- build/*/*/*/*.cmake
- build/*/*/*/*/*.cmake
- build/*/*/*/*/*/*.cmake
- build/Testing/
# CDash files.
- build/DartConfiguration.tcl
.cmake_test_windows: &cmake_test_windows
stage: test
timeout: 50 minutes
interruptible: true
before_script:
- .gitlab/ci/config/setup_vs_powershell.ps1
script:
#Need to use our custom ctest-latest symlink
#This will allow us to use 3.17+ which has support
#for running failed tests multiple times so failures
#due to system load are not reported
- "ctest-latest -VV -S .gitlab/ci/ctest_test.cmake"
# Build on windows10 with Visual Studio
# Will have CUDA 10.2 once build issues are resolved
build:windows_vs2019:
tags:
- build
- vtkm
- windows
- vs2019
- shell
- large-memory
extends:
- .cmake_build_windows
- .only-default
variables:
CMAKE_GENERATOR: "Ninja"
CMAKE_BUILD_TYPE: Release
# Disabled while we track down cub allocator issues with vtkm/io tests
# VTKM_SETTINGS: "cuda+turing"
VTKM_SETTINGS: "serial"
test:windows_vs2019:
tags:
- test
- vtkm
- windows
- shell
- cuda-rt
- turing
extends:
- .cmake_test_windows
- .only-default
dependencies:
- build:windows_vs2019
needs:
- build:windows_vs2019