Skip to content

Commit

Permalink
Merge pull request #1 from fmoessbauer/feat-cleanup
Browse files Browse the repository at this point in the history
Major cleanup and re-structuring
  • Loading branch information
fmoessbauer authored Oct 26, 2018
2 parents 0bf85ec + c9d0638 commit 0b13751
Show file tree
Hide file tree
Showing 41 changed files with 221 additions and 422 deletions.
54 changes: 35 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,59 @@
version: 2
jobs:
build_gcc:
docker:
- image: thoughton/gcc-cmake:latest
steps:
- checkout
- run: git submodule update --init --recursive --remote
- run: bash build.sh
- run: ./build/test/LibMVC-test data/frb30-15-mis/frb30-15-1.mis 420 450 10
coverage:
docker:
- image: thoughton/gcc-cmake:latest
- image: ubuntu:latest
steps:
- run: apt update && apt install lcov gcovr -y
- run: apt update && apt install git curl build-essential ninja-build meson lcov gcovr -y
- checkout
- run: git submodule update --init --recursive --remote
- run: bash build.cov.sh
- run: cd build.cov && make LibMVC-test-coverage
- run: meson -Db_coverage=true build.cov
- run: cd build.cov && ninja
- run: cd build.cov && ninja test
- run: cd build.cov && ninja coverage-xml
- run: bash <(curl -s https://codecov.io/bash)
- store_artifacts:
path: build.cov/LibMVC-test-coverage.xml
path: build.cov/build.cov/meson-logs/coverage.xml
prefix: coverage
meson:
- store_artifacts:
path: build.cov/meson-logs

gcc:
docker:
- image: ubuntu:latest
steps:
- run: apt update && apt install git build-essential ninja-build meson -y
- checkout
- run: git submodule update --init --recursive --remote
- run: meson build
- run: meson build --warnlevel 3 --werror --prefix=/opt/libmvc
- run: cd build && ninja
- run: cd build && ninja test
- run: cd build && ninja benchmark
# install and run standalone solvers
- run: cd build && ninja install
- run: /opt/libmvc/bin/NuMVC-standalone data/frb30-15-mis/frb30-15-1.mis 420 100
- run: /opt/libmvc/bin/FastVC-standalone data/frb30-15-mis/frb30-15-1.mis 420 100
- run: /opt/libmvc/bin/NuMVC-parallel-standalone data/frb30-15-mis/frb30-15-1.mis 420 100
- run: /opt/libmvc/bin/FastVC-parallel-standalone data/frb30-15-mis/frb30-15-1.mis 420 100
- store_artifacts:
path: build/meson-logs

clang:
docker:
- image: ubuntu:latest
steps:
- run: apt update && apt install git clang-6.0 ninja-build meson -y
- checkout
- run: CXX=clang++-6.0 meson build --warnlevel 3 --werror
- run: cd build && ninja
- run: cd build && ninja test
- run: cd build && ninja benchmark
- store_artifacts:
path: build/meson-logs

workflows:
version: 2
build_and_test:
jobs:
- build_gcc
- coverage
- meson
- gcc
- clang

3 changes: 1 addition & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ignore:
- "Lib.*/main.cpp$"
- "ParallelSolverAdapter/main.cpp$"
- "standalone/main.cpp$"

9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

51 changes: 0 additions & 51 deletions CMakeLists.txt

This file was deleted.

14 changes: 0 additions & 14 deletions LibFastVC/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions LibFastVC/Makefile

This file was deleted.

66 changes: 0 additions & 66 deletions LibFastVC/main.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions LibFastVC/meson.build

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,16 @@ class ParallelSolverAdapter {

private:
static bool monitor(
const SOLVER &solver, bool better_cover_found, unsigned int tid,
const SOLVER & /* solver */,
bool better_cover_found,
unsigned int tid,
ParallelSolverAdapter *self,
std::function<bool(const ParallelSolverAdapter &, bool)> printer) {
std::function<bool(const ParallelSolverAdapter &, bool)> printer)
{
auto cover_size = self->solvers[tid]->get_best_cover_size();
auto &state = self->global_state;


// only lock if actual change present
if (better_cover_found) {
if (cover_size < state.best_cover) {
Expand Down Expand Up @@ -251,7 +255,7 @@ class ParallelSolverAdapter {
*/
std::vector<int> get_independent_set(bool bias_by_one = true) const {
auto best = global_state.best_solver;
return solvers[best]->get_independent_set();
return solvers[best]->get_independent_set(bias_by_one);
}

/**
Expand Down
14 changes: 0 additions & 14 deletions LibNuMVC/CMakeLists.txt

This file was deleted.

19 changes: 0 additions & 19 deletions LibNuMVC/Makefile

This file was deleted.

2 changes: 0 additions & 2 deletions LibNuMVC/meson.build

This file was deleted.

18 changes: 0 additions & 18 deletions ParallelSolverAdapter/CMakeLists.txt

This file was deleted.

18 changes: 0 additions & 18 deletions ParallelSolverAdapter/Makefile

This file was deleted.

Loading

0 comments on commit 0b13751

Please sign in to comment.