Skip to content

Commit

Permalink
Enable ctests
Browse files Browse the repository at this point in the history
  • Loading branch information
sguionni committed Nov 9, 2023
1 parent 1f6917f commit 5aafc05
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/cmake_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:
- name: Create default profile
run: conan profile detect --force

- name: Create packages
- name: Create package
working-directory: ${{env.CMAKELISTS_DIR}}
run: |
conan export ../util
conan export ../core
conan export ../io/chemfiles
conan export ../io
conan export ../renderer
conan export .
conan create test --build=missing --settings=compiler.cppstd=20
conan create . --build=missing --settings=compiler.cppstd=20
- name: Test
working-directory: ${{env.CMAKELISTS_DIR}}
run: ctest --verbose
run: conan create test --build=missing --settings=compiler.cppstd=20
2 changes: 1 addition & 1 deletion .github/workflows/cmake_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Create default profile
run: conan profile detect

- name: Create packages
- name: Create package
working-directory: ${{env.CMAKELISTS_DIR}}
run: |
conan export ../util
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/cmake_io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ jobs:
- name: Create default profile
run: conan profile detect

- name: Create packages
- name: Create package
working-directory: ${{env.CMAKELISTS_DIR}}
run: |
conan export ../util
conan export ../core
conan export chemfiles
conan export .
conan create test --build=missing --settings=compiler.cppstd=20
conan create . --build=missing --settings=compiler.cppstd=20
- name: Test
working-directory: ${{env.CMAKELISTS_DIR}}
run: ctest --verbose
run: conan create test --build=missing --settings=compiler.cppstd=20
17 changes: 10 additions & 7 deletions .github/workflows/cmake_renderer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ jobs:
- name: Create default profile
run: conan profile detect --force

- name: Create packages
- name: Create package
working-directory: ${{env.CMAKELISTS_DIR}}
run: |
conan export ../util
conan export .
conan create test --build=missing --settings=compiler.cppstd=20 -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
- name: Test
working-directory: ${{env.CMAKELISTS_DIR}}
run: conan create test --build=missing --settings=compiler.cppstd=20

- name: Create benchmarker
working-directory: ${{env.CMAKELISTS_DIR}}
run: |
conan export ../core
conan export ../io/chemfiles
conan export ../io
conan create bench --build=missing --settings=compiler.cppstd=20 -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True
- name: Test
working-directory: ${{env.CMAKELISTS_DIR}}
run: ctest --verbose

# - name: Install
# if: runner.os == 'Windows'
# working-directory: ${{env.CMAKELISTS_DIR}}/${{env.CMAKE_BUILD_DIR}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake_util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Create default profile
run: conan profile detect

- name: Create packages
- name: Create package
working-directory: ${{env.CMAKELISTS_DIR}}
run: conan create . --build=missing --settings=compiler.cppstd=20

Expand Down
1 change: 1 addition & 0 deletions lib/app/test/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
self.run("ctest --rerun-failed --output-on-failure")

def package(self):
cmake = CMake(self)
Expand Down
1 change: 1 addition & 0 deletions lib/io/test/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
self.run("ctest --rerun-failed --output-on-failure")

def package(self):
cmake = CMake(self)
Expand Down
1 change: 1 addition & 0 deletions lib/renderer/test/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
self.run("ctest --rerun-failed --output-on-failure")

def package(self):
cmake = CMake(self)
Expand Down
2 changes: 1 addition & 1 deletion lib/util/test/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ TEST_CASE( "Util::String", "[string]" )
REQUIRE( VTX::Util::String::floatToStr( f, 5 ) == "3.14159" );

str = "3.14159";
REQUIRE( VTX::Util::String::strToUint( str ) == 4 );
REQUIRE( VTX::Util::String::strToUint( str ) == 3 );
}

// filesystem.hpp
Expand Down

0 comments on commit 5aafc05

Please sign in to comment.