Welcome to mirror list, hosted at ThFree Co, Russian Federation.

.ci.cmake - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b7b61bf4707f734fae8502be70a91f6c70c5d676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# CTest script for a CI to submit to CDash a run of configuration,
# building and testing
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
include(cmake/QuickCppLibBootstrap.cmake)
include(QuickCppLibUtils)


CONFIGURE_CTEST_SCRIPT_FOR_CDASH("afio" "prebuilt")
ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
include(FindGit)
set(CTEST_GIT_COMMAND "${GIT_EXECUTABLE}")

ctest_start("Experimental")
ctest_update()
ctest_configure()
ctest_build(TARGET _dl)
ctest_build(TARGET _sl)
ctest_test(RETURN_VALUE retval EXCLUDE "afio_hl|shared_fs_mutex")
if(WIN32)
  if(EXISTS "prebuilt/bin/Release/afio_dl-2.0-Windows-x64-Release.dll")
    checked_execute_process("Tarring up binaries 1"
      COMMAND "${CMAKE_COMMAND}" -E make_directory afio/prebuilt/bin/Release
      COMMAND "${CMAKE_COMMAND}" -E make_directory afio/prebuilt/lib/Release
      COMMAND xcopy doc afio\\doc\\ /s /q
      COMMAND xcopy include afio\\include\\ /s /q
    )
    checked_execute_process("Tarring up binaries 2a"
      COMMAND copy Readme.md afio\\
    )
    checked_execute_process("Tarring up binaries 2b"
      COMMAND copy release_notes.md afio\\
    )
    checked_execute_process("Tarring up binaries 3"
      COMMAND copy prebuilt\\lib\\Release\\afio_sl-2.0-Windows-x64-Release.lib afio\\prebuilt\\lib\\Release\\
      COMMAND copy prebuilt\\lib\\Release\\ntkernel-error-category_sl.lib afio\\prebuilt\\lib\\Release\\
      COMMAND copy prebuilt\\lib\\Release\\afio_dl-2.0-Windows-x64-Release.lib afio\\prebuilt\\lib\\Release\\
      COMMAND copy prebuilt\\lib\\Release\\ntkernel-error-category_dl.lib afio\\prebuilt\\lib\\Release\\
      COMMAND copy prebuilt\\bin\\Release\\afio_dl-2.0-Windows-x64-Release.dll afio\\prebuilt\\bin\\Release\\
      COMMAND copy prebuilt\\bin\\Release\\ntkernel-error-category_dl.dll afio\\prebuilt\\bin\\Release\\
    )
    checked_execute_process("Tarring up binaries 4"
      COMMAND 7za a -tzip afio-v2.0-binaries-win64.zip afio\\
    )
    get_filename_component(toupload afio-v2.0-binaries-win64.zip ABSOLUTE)
  endif()
else()
  if(EXISTS "prebuilt/lib/libafio_dl-2.0-Linux-x86_64-Release.so")
    checked_execute_process("Tarring up binaries"
      COMMAND mkdir afio
      COMMAND cp -a doc afio/
      COMMAND cp -a include afio/
      COMMAND cp -a Readme.md afio/
      COMMAND cp -a release_notes.md afio/
      COMMAND cp -a --parents prebuilt/lib/libafio_sl-2.0-Linux-x86_64-Release.a afio/
      COMMAND cp -a --parents prebuilt/lib/libafio_dl-2.0-Linux-x86_64-Release.so afio/
      COMMAND "${CMAKE_COMMAND}" -E tar cfz afio-v2.0-binaries-linux64.tgz afio
    )
    get_filename_component(toupload afio-v2.0-binaries-linux64.tgz ABSOLUTE)
  endif()
endif()
if(("$ENV{CXX}" MATCHES "clang") OR ("$ENV{CXX}" MATCHES "g\\+\\+"))
  if("$ENV{CXX}" MATCHES "clang")
    ctest_build(TARGET _sl-asan)
    set(CTEST_CONFIGURATION_TYPE "asan")
    ctest_test(RETURN_VALUE retval2 INCLUDE "afio_sl" EXCLUDE "shared_fs_mutex")
  else()
    set(retval2 0)
  endif()
  ctest_build(TARGET _sl-ubsan)
  set(CTEST_CONFIGURATION_TYPE "ubsan")
  ctest_test(RETURN_VALUE retval3 INCLUDE "afio_sl" EXCLUDE "shared_fs_mutex")
endif()
merge_junit_results_into_ctest_xml()
if(EXISTS "${toupload}")
  ctest_upload(FILES "${toupload}")
endif()
ctest_submit()
if(NOT retval EQUAL 0 OR NOT retval2 EQUAL 0 OR NOT retval3 EQUAL 0)
  message(FATAL_ERROR "FATAL: Running tests exited with ${retval} ${retval2} ${retval3}")
endif()