File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 4444 conan remote list
4545 conan profile show
4646
47- - name : Build the client with conan
47+ - name : Build the client with conan and run tests
4848 run : |
4949 conan build . --profile=.conan/profiles/${{ matrix.profile }}.conanprofile -s build_type=${{ matrix.build_type }}
50-
51- - name : Run tests
52- shell : bash
53- run : |
54- cd build
55- if [ -d ${{ matrix.build_type }} ]; then
56- cd ${{ matrix.build_type }}
57- fi
58- ctest --output-on-failure -C ${{ matrix.build_type }}
Original file line number Diff line number Diff line change 11from conan import ConanFile
2+ from conan .tools .build import can_run
23from conan .tools .cmake import cmake_layout , CMake
34
45class ClientRecipe (ConanFile ):
@@ -47,7 +48,7 @@ def layout(self):
4748
4849 def build (self ):
4950 cmake = CMake (self )
50- #cmake.configure(None, None, ["--trace"])
5151 cmake .configure ()
52- #cmake.build(None, None, ["--verbose"])
53- cmake .build ()
52+ cmake .build ()
53+ if can_run (self ):
54+ cmake .ctest ()
You can’t perform that action at this time.
0 commit comments