File tree Expand file tree Collapse file tree
shamrock/include/shamrock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,11 +103,18 @@ jobs:
103103 cd build
104104 source ./activate && shamconfigure
105105
106- - name : Build
106+ - name : Configure sham install
107107 shell : bash # In docker container github action default to sh
108108 run : |
109109 cd build
110- source ./activate && shammake
110+ source ./activate && \
111+ cmake . -DCMAKE_INSTALL_PREFIX=$(pwd)/install_test
112+
113+ - name : Build & install
114+ shell : bash # In docker container github action default to sh
115+ run : |
116+ cd build
117+ source ./activate && shammake install
111118
112119 - name : Pull reference files
113120 run : |
@@ -151,3 +158,11 @@ jobs:
151158 run : |
152159 cd build
153160 mpirun --allow-run-as-root --bind-to socket:overload-allowed --oversubscribe -n 4 ./shamrock_test --color --sycl-ls-map --sycl-cfg 0:0 --loglevel 0 --benchmark-mpi
161+
162+ - name : Try starting Shamrock (installed version)
163+ shell : bash # In docker container github action default to sh
164+ if : matrix.runtest
165+ run : |
166+ cd build/install_test/bin
167+ ls ..
168+ LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./shamrock --smi --sycl-cfg 0:0
Original file line number Diff line number Diff line change @@ -64,10 +64,16 @@ jobs:
6464 cd build
6565 source ./activate && shamconfigure
6666
67- - name : Build
67+ - name : Configure sham install
6868 run : |
6969 cd build
70- source ./activate && shammake
70+ source ./activate && \
71+ cmake . -DCMAKE_INSTALL_PREFIX=$(pwd)/install_test
72+
73+ - name : Build & install
74+ run : |
75+ cd build
76+ source ./activate && shammake install
7177
7278 - name : Pull reference files
7379 run : |
@@ -118,3 +124,10 @@ jobs:
118124 cd build
119125 source ./activate
120126 mpirun --allow-run-as-root --bind-to socket:overload-allowed --oversubscribe -n 4 ./shamrock_test --color --sycl-ls-map --sycl-cfg 0:0 --loglevel 0 --benchmark-mpi
127+
128+ - name : Try starting Shamrock (installed version)
129+ if : matrix.runtest
130+ run : |
131+ cd build/install_test/bin
132+ ls ..
133+ LD_LIBRARY_PATH=../lib:$LD_LIBRARY_PATH ./shamrock --smi --sycl-cfg 0:0
Original file line number Diff line number Diff line change @@ -65,10 +65,16 @@ jobs:
6565 cd build
6666 source ./activate && shamconfigure
6767
68- - name : Build
68+ - name : Configure sham install
6969 run : |
7070 cd build
71- source ./activate && shammake
71+ source ./activate && \
72+ cmake . -DCMAKE_INSTALL_PREFIX=$(pwd)/install_test
73+
74+ - name : Build & install
75+ run : |
76+ cd build
77+ source ./activate && shammake install
7278
7379 - name : Pull reference files
7480 run : |
@@ -94,3 +100,10 @@ jobs:
94100 run : |
95101 cd build
96102 mpirun --oversubscribe -n 4 ./shamrock_test --sycl-ls-map --sycl-cfg 0:0 --loglevel 0 --benchmark-mpi
103+
104+
105+ - name : Try starting Shamrock (installed version)
106+ run : |
107+ cd build/install_test/bin
108+ ls ..
109+ LD_LIBRARY_PATH=../lib64:$LD_LIBRARY_PATH ./shamrock --smi --sycl-cfg 0:0
Original file line number Diff line number Diff line change @@ -88,10 +88,15 @@ endif()
8888target_include_directories (shamrock PUBLIC "${CMAKE_SOURCE_DIR} /src" )
8989#target_include_directories(shamrock PUBLIC "${CMAKE_SOURCE_DIR}/external")
9090
91- #do lib build instead if building the pylib
92-
93-
94-
91+ # Installing the library
92+ install (TARGETS shamrock ${as_subproject}
93+ EXPORT "shamrock-config"
94+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} "
95+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR} "
96+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR} "
97+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
98+ PRIVATE_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} "
99+ INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR} " )
95100
96101if ("${BUILD_TEST} " )
97102
Original file line number Diff line number Diff line change @@ -55,8 +55,11 @@ inline void print_title_bar() {
5555
5656 logger::raw_ln (
5757 " \n " + shambase::term_colors::col8b_cyan () + " Shamrock version "
58- + shambase::term_colors::reset () + " : " + version_string);
59- logger::raw_ln (
60- " \n " + shambase::term_colors::col8b_cyan () + " Git infos " + shambase::term_colors::reset ()
61- + " :\n " + shambase::trunc_str (git_info_str, 512 ));
58+ + shambase::term_colors::reset () + " : " + version_string + " \n " );
59+
60+ if (is_git) {
61+ logger::raw_ln (
62+ shambase::term_colors::col8b_cyan () + " Git infos " + shambase::term_colors::reset ()
63+ + " :\n " + shambase::trunc_str (git_info_str, 512 ));
64+ }
6265}
You can’t perform that action at this time.
0 commit comments