File tree Expand file tree Collapse file tree 5 files changed +285
-295
lines changed Expand file tree Collapse file tree 5 files changed +285
-295
lines changed Original file line number Diff line number Diff line change 1+ name : MinGW Windows static test
2+
3+ on :
4+ push :
5+ branches : ['*']
6+ tags :
7+ paths_ignore : ['docs/**', '.travis.yml']
8+ pull_request :
9+
10+ jobs :
11+ build :
12+ name : MinGW batteries-included
13+ runs-on : windows-latest
14+
15+ defaults :
16+ run :
17+ shell : ' msys2 {0}'
18+
19+ steps :
20+ - uses : actions/checkout@v2
21+ - uses : msys2/setup-msys2@v2
22+ with :
23+ release : false
24+ - name : Configure CMake
25+ run : |
26+ cmake --version
27+ cmake -S . -B build \
28+ -DCMAKE_BUILD_TYPE=Release \
29+ -DCMAKE_INSTALL_PREFIX=${PWD}/install \
30+ -DLSL_UNITTESTS=ON \
31+ -DLSL_BUILD_EXAMPLES=ON \
32+ -DLSL_BUILD_STATIC=ON \
33+ -Dlslgitrevision=${{ github.sha }} \
34+ -Dlslgitbranch=${{ github.ref }} \
35+ -DLSL_OPTIMIZATIONS=OFF \
36+ -G 'MSYS Makefiles'
37+
38+ - name : make
39+ run : cmake --build build --target install --config Release -j --verbose
40+
41+ - name : upload install dir
42+ uses : actions/upload-artifact@master
43+ with :
44+ name : mingw_artifacts
45+ path : install
46+
47+ # run internal tests, ignore test failures on docker (missing IPv6 connectivity)
48+ - name : unit tests (internal functions)
49+ run : ' install/bin/lsl_test_internal --order rand --wait-for-keypress never --durations yes'
50+ timeout-minutes : 5
51+
52+ - name : unit tests (exported functions)
53+ run : install/bin/lsl_test_exported --wait-for-keypress never --durations yes
54+ timeout-minutes : 5
55+
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ if(LSL_BUNDLED_PUGIXML)
114114 message (STATUS "Using bundled pugixml" )
115115 target_sources (lslobj PRIVATE thirdparty/pugixml/pugixml.cpp)
116116 target_include_directories (lslobj SYSTEM PUBLIC
117- ${CMAKE_CURRENT_SOURCE_DIR} /thirdparty/pugixml)
117+ $<BUILD_INTERFACE: $ {CMAKE_CURRENT_SOURCE_DIR} /thirdparty/pugixml> )
118118else ()
119119 message (STATUS "Using system pugixml" )
120120 find_package (pugixml REQUIRED)
@@ -178,7 +178,7 @@ target_compile_definitions(lslboost
178178 BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
179179)
180180target_include_directories (lslboost SYSTEM PUBLIC
181- ${CMAKE_CURRENT_SOURCE_DIR} /lslboost)
181+ $<BUILD_INTERFACE: $ {CMAKE_CURRENT_SOURCE_DIR} /lslboost> )
182182
183183# target configuration for the internal lslobj target
184184target_link_libraries (lslobj PRIVATE lslboost)
@@ -273,7 +273,12 @@ write_basic_package_version_file(
273273 COMPATIBILITY AnyNewerVersion
274274)
275275
276- install (TARGETS lsl
276+ set (LSLTargets lsl)
277+ if (LSL_BUILD_STATIC)
278+ list (APPEND LSLTargets lslobj lslboost)
279+ endif ()
280+
281+ install (TARGETS ${LSLTargets}
277282 EXPORT LSLTargets
278283 COMPONENT liblsl
279284 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
You can’t perform that action at this time.
0 commit comments