swh:1:snp:f521c49ab17ef7db6ec70b2430e1ed203f50383f
Raw File
Tip revision: 8238bf796660b0f4b40af2adc3e3627659d3c725 authored by Karsten Rink on 22 March 2021, 09:57:22 UTC
Merge branch 'VerticalSliceSaveLines' into 'master'
Tip revision: 8238bf7
template-build-win.yml
.template-build-win:
  stage: build
  tags:
    - windows
  extends:
    - .vs2019-environment
    - .test-artifacts
  dependencies: [meta]
  variables:
  script:
    - $build_directory = if ($env:BUILD_DIR) { $env:BUILD_DIR } else { $env:CMAKE_PRESET }
    - $build_directory_full = "..\build\" + $build_directory
    - (rm -r -fo $build_directory_full)
    - cmd /c if not exist $build_directory_full mkdir $build_directory_full
    - mkdir build
    # Create symlink https://stackoverflow.com/a/34905638/80480
    - cmd /c mklink /D build\$build_directory $env:CI_PROJECT_DIR\$build_directory_full
    - $cmake_cmd = "cmake -S . -B $build_directory_full --preset=$env:CMAKE_PRESET
      $env:CMAKE_ARGS
      -DOGS_BUILD_PROCESSES=$env:BUILD_PROCESSES"
    - $cmake_cmd
    - Invoke-Expression $cmake_cmd
    - cd $build_directory_full
    - cmake --build . --target package | Tee-Object -FilePath make.output
    - if($env:BUILD_TESTS -eq "true") { cmake --build . --target tests }
    - if($env:BUILD_CTEST -eq "true") { cmake --build . --target ctest }
    - if($env:BUILD_CTEST -eq "true") { cp Testing/**/Test.xml Tests/ctest.xml }
    - |
      if($env:CHECK_WARNINGS -eq "true" -and (cat make.output | Select-String -Pattern ': warning') )
      {
          Write-Output 'There were compiler warnings:\n'
          cat make.output | Select-String -Pattern ': warning'
          exit 1
      }
back to top