Skip to content
Snippets Groups Projects
Commit 7598b1b2 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

try to create CI template

parent 75e4bc90
No related branches found
No related tags found
No related merge requests found
Pipeline #9044 passed
spec:
inputs:
stage:
default: test
---
component-job:
script: echo job 1
.job-template-windows:
stage: $[[ inputs.stage ]]
#image: $CI_REGISTRY_IMAGE:windows-vs17-rel-latest
image: gitlab.inf.unibe.ch:5001/cgg-public/containers/buildbox-windows:x64-vs2022-latest
variables:
CL_NAME: "cl"
TOOLSET: "v143"
VCPKG_ROOT: "C:/Tools/vcpkg/"
tags:
- cgg
- win22
- docker-windows
variables:
BUILD_TYPE: Release # Debug currently fails with an internal LLVM error
#CL_NAME: clang-cl
CL_NAME: cl
TOOLSET: "v143"
before_script:
#- '&${Env:CLCACHE} -s'
#- '${Env:CLCACHE_CL}=Get-Command "${ENV:CL_NAME}" | Select-Object -expand Source'
# -Force prevents an error if the directory already exists.
- 'md ${Env:VCPKG_DEFAULT_BINARY_CACHE} -ea 0 -Force'
- 'md ${Env:CCACHE_DIR} -ea 0 -Force'
- 'md ${Env:CHOCO_CACHE} -ea 0 -Force'
- '$buildDir="build-${Env:CI_JOB_NAME}"'
- 'mkdir $buildDir > $null'
- 'ccache -s -v'
- 'cd $buildDir'
artifacts:
when: always
reports:
junit: build-${CI_JOB_NAME}/test-report-${BUILD_TYPE}.xml
.job-template-windows-msbuild:
extends: .job-template-windows
script:
- '$cmakeGenerator="Visual Studio 17 2022"'
- 'echo "Toolset: ${Env:TOOLSET}"'
- >
cmake -G "${cmakeGenerator}" ..
-T "${Env:TOOLSET}"
-A x64
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DCOMISO_ENABLE_METIS=OFF
- 'if(!$?) { throw "cmake failed" }'
- >
cmake --build .
--config "${Env:BUILD_TYPE}"
--
/nologo
/verbosity:minimal
/maxcpucount
/p:TrackFileAccess=false
#/p:CLToolExe=ccache.exe
- 'if(!$?) { throw "build failed" }'
- 'ctest --output-junit test-report-${Env:BUILD_TYPE}.xml'
- 'if(!$?) { throw "tests failed" }'
.job-template-windows-ninja:
extends: .job-template-windows
script:
- >
cmake -G Ninja ..
-DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}"
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCOMISO_ENABLE_METIS=OFF
- 'if(!$?) { throw "cmake failed" }'
- 'cmake --build .'
- 'if(!$?) { throw "build failed" }'
- 'ctest --output-junit test-report-${Env:BUILD_TYPE}.xml'
- 'if(!$?) { throw "tests failed" }'
- 'ccache -s'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment