diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92703a3..d0cea54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,15 +19,14 @@ jobs: run: sudo apt-get install -y libgtest-dev libgmock-dev clang-tidy lcov #clang-format - name: Configure CMake - run: | - rm -rf build - mkdir build - cd build + run: | # ensures a fresh environment for each build + mkdir -p build + cd build cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_CXX_STANDARD=20 .. - name: Build Main Executable and Test Executable - run: | - cd build + run: | + cd build make # - name: Analyze code with clang-tidy @@ -44,7 +43,7 @@ jobs: - name: Run all Tests run: | cd build - ctest -R AllTests --output-on-failure + ctest --output-on-failure # - name: Generate code coverage # run: | diff --git a/cmake-build-cmake/.ninja_log b/cmake-build-cmake/.ninja_log index 2f1583f..ca6fff4 100644 --- a/cmake-build-cmake/.ninja_log +++ b/cmake-build-cmake/.ninja_log @@ -33,3 +33,5 @@ 30 224 1721111159292832750 /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests 51903612152c3c7d 49 278 1721112733607081719 tests/CMakeFiles/Tests 51903612152c3c7d 49 278 1721112733607081719 /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests 51903612152c3c7d +41 262 1721114972327539687 tests/CMakeFiles/Tests 51903612152c3c7d +41 262 1721114972327539687 /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/CMakeFiles/Tests 51903612152c3c7d diff --git a/cmake-build-cmake/Testing/Temporary/LastTest.log b/cmake-build-cmake/Testing/Temporary/LastTest.log index e2b1650..969c4aa 100644 --- a/cmake-build-cmake/Testing/Temporary/LastTest.log +++ b/cmake-build-cmake/Testing/Temporary/LastTest.log @@ -1,77 +1,3 @@ -Start testing: Jul 16 08:52 CEST +Start testing: Jul 16 09:29 CEST ---------------------------------------------------------- -1/2 Testing: UnitTests -1/2 Test: UnitTests -Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/Unit_tests" -Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit -"UnitTests" start time: Jul 16 08:52 CEST -Output: ----------------------------------------------------------- -[==========] Running 12 tests from 4 test suites. -[----------] Global test environment set-up. -[----------] 6 tests from MarketDataTest -[ RUN ] MarketDataTest.SingletonInstance -[ OK ] MarketDataTest.SingletonInstance (0 ms) -[ RUN ] MarketDataTest.NotifyObserver -[ OK ] MarketDataTest.NotifyObserver (0 ms) -[ RUN ] MarketDataTest.NotifyAllObservers -[ OK ] MarketDataTest.NotifyAllObservers (0 ms) -[ RUN ] MarketDataTest.AddAndUpdateStockData -[ OK ] MarketDataTest.AddAndUpdateStockData (0 ms) -[ RUN ] MarketDataTest.UpdateNonExistentStock -[ OK ] MarketDataTest.UpdateNonExistentStock (0 ms) -[ RUN ] MarketDataTest.RiskFreeRate -[ OK ] MarketDataTest.RiskFreeRate (0 ms) -[----------] 6 tests from MarketDataTest (0 ms total) - -[----------] 1 test from StockDataTest -[ RUN ] StockDataTest.InvalidStockData -[ OK ] StockDataTest.InvalidStockData (0 ms) -[----------] 1 test from StockDataTest (0 ms total) - -[----------] 4 tests from PayoffSingleStrikeTest -[ RUN ] PayoffSingleStrikeTest.PayoffCallTests -[ OK ] PayoffSingleStrikeTest.PayoffCallTests (0 ms) -[ RUN ] PayoffSingleStrikeTest.PayoffPutTests -[ OK ] PayoffSingleStrikeTest.PayoffPutTests (0 ms) -[ RUN ] PayoffSingleStrikeTest.PayoffDigitalCallTests -[ OK ] PayoffSingleStrikeTest.PayoffDigitalCallTests (0 ms) -[ RUN ] PayoffSingleStrikeTest.PayoffDigitalPutTests -[ OK ] PayoffSingleStrikeTest.PayoffDigitalPutTests (0 ms) -[----------] 4 tests from PayoffSingleStrikeTest (0 ms total) - -[----------] 1 test from PayoffDoubleStrikesTest -[ RUN ] PayoffDoubleStrikesTest.PayoffDoubleDigitalTests -[ OK ] PayoffDoubleStrikesTest.PayoffDoubleDigitalTests (0 ms) -[----------] 1 test from PayoffDoubleStrikesTest (0 ms total) - -[----------] Global test environment tear-down -[==========] 12 tests from 4 test suites ran. (0 ms total) -[ PASSED ] 12 tests. - -Test time = 0.01 sec ----------------------------------------------------------- -Test Passed. -"UnitTests" end time: Jul 16 08:52 CEST -"UnitTests" time elapsed: 00:00:00 ----------------------------------------------------------- - -2/2 Testing: IntegrationTests -2/2 Test: IntegrationTests -Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/Integration_tests" -Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration -"IntegrationTests" start time: Jul 16 08:52 CEST -Output: ----------------------------------------------------------- -[==========] Running 0 tests from 0 test suites. -[==========] 0 tests from 0 test suites ran. (0 ms total) -[ PASSED ] 0 tests. - -Test time = 0.01 sec ----------------------------------------------------------- -Test Passed. -"IntegrationTests" end time: Jul 16 08:52 CEST -"IntegrationTests" time elapsed: 00:00:00 ----------------------------------------------------------- - -End testing: Jul 16 08:52 CEST +End testing: Jul 16 09:29 CEST diff --git a/cmake-build-cmake/tests/Testing/Temporary/CTestCostData.txt b/cmake-build-cmake/tests/Testing/Temporary/CTestCostData.txt index a447362..e08182e 100644 --- a/cmake-build-cmake/tests/Testing/Temporary/CTestCostData.txt +++ b/cmake-build-cmake/tests/Testing/Temporary/CTestCostData.txt @@ -1,3 +1,3 @@ -UnitTests 2 0.00937588 -IntegrationTests 2 0.00869047 +UnitTests 3 0.00582454 +IntegrationTests 3 0.00482503 --- diff --git a/cmake-build-cmake/tests/Testing/Temporary/LastTest.log b/cmake-build-cmake/tests/Testing/Temporary/LastTest.log index fe36423..98fe10c 100644 --- a/cmake-build-cmake/tests/Testing/Temporary/LastTest.log +++ b/cmake-build-cmake/tests/Testing/Temporary/LastTest.log @@ -1,10 +1,10 @@ -Start testing: Jul 16 08:52 CEST +Start testing: Jul 16 09:29 CEST ---------------------------------------------------------- 1/2 Testing: UnitTests 1/2 Test: UnitTests Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit/Unit_tests" Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/unit -"UnitTests" start time: Jul 16 08:52 CEST +"UnitTests" start time: Jul 16 09:29 CEST Output: ---------------------------------------------------------- [==========] Running 12 tests from 4 test suites. @@ -52,7 +52,7 @@ Output: Test time = 0.02 sec ---------------------------------------------------------- Test Passed. -"UnitTests" end time: Jul 16 08:52 CEST +"UnitTests" end time: Jul 16 09:29 CEST "UnitTests" time elapsed: 00:00:00 ---------------------------------------------------------- @@ -60,18 +60,18 @@ Test Passed. 2/2 Test: IntegrationTests Command: "/Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration/Integration_tests" Directory: /Users/anthony/CLionProjects/Option_pricer/cmake-build-cmake/tests/integration -"IntegrationTests" start time: Jul 16 08:52 CEST +"IntegrationTests" start time: Jul 16 09:29 CEST Output: ---------------------------------------------------------- [==========] Running 0 tests from 0 test suites. [==========] 0 tests from 0 test suites ran. (0 ms total) [ PASSED ] 0 tests. -Test time = 0.02 sec +Test time = 0.01 sec ---------------------------------------------------------- Test Passed. -"IntegrationTests" end time: Jul 16 08:52 CEST +"IntegrationTests" end time: Jul 16 09:29 CEST "IntegrationTests" time elapsed: 00:00:00 ---------------------------------------------------------- -End testing: Jul 16 08:52 CEST +End testing: Jul 16 09:29 CEST