Skip to content

Commit

Permalink
test push
Browse files Browse the repository at this point in the history
  • Loading branch information
ben committed Apr 4, 2024
1 parent f1ee4b7 commit 387020e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,21 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install packages
run: sudo apt -y install git g++ cmake libsqlite3-dev gcovr libjpeg-dev
shell: bash

- name: Clone aquamarine repo
run: git clone --branch ${{ github.head_ref }} https://github.com/MaksymT17/aquamarine.git
shell: bash

- name: Build artifacts with Cmake
run: |
cd aquamarine
./build.sh
echo "removing existing build folder..."
rm -rf build/ &&
mkdir build &&
echo "preparing new build with cmake..." &&
cd build/ &&
cmake .. &&
cmake --build . &&
echo "Build complete!"
shell: bash

- name: Run unit tests
Expand Down
4 changes: 2 additions & 2 deletions AmApi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ namespace am
obj.getMaxHeight());
}

#ifdef __unix__
if(dbcPtr)
{
std::stringstream ss;
ss << "'" << am::common::get_datetime() << "', '" << base_img << "', '" << cmp_img << "', " << objects.size();
#ifdef __unix__
dbcPtr->add_results_table(); // if already exists - it produces a warning
dbcPtr->insert_records2results({ss.str()});
#endif
}
#endif
drawer.save(out_diff_img);
}

Expand Down
4 changes: 4 additions & 0 deletions AmApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#include "configuration/ConfigurationReader.hpp"
#include "common/Logger.hpp"
#include "extraction/MultipleExtractor.h"
#ifdef __unix__
#include "database/DataBaseCommunicator.h"
#endif

namespace am
{
Expand All @@ -26,7 +28,9 @@ namespace am

std::string base_img_path;
std::string cmp_img_path;
#ifdef __unix__
std::unique_ptr<database::DataBaseCommunicator> dbcPtr;
#endif
std::shared_ptr<configuration::Configuration> configuration;
};
}
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ cmake_minimum_required (VERSION 3.0)

project (aquamarine)

if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
#if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
#endif()

# Set the CMAKE_CXX_STANDARD variable to 17
set(CMAKE_CXX_STANDARD 17)

# Set the CMAKE_CXX_STANDARD_REQUIRED variable to ON
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
# not used, in case of need fno-rtti can be removed
Expand Down

0 comments on commit 387020e

Please sign in to comment.