Skip to content

Commit

Permalink
get rid of pybind in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Oct 6, 2023
1 parent cc3d8e8 commit b88764d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:

- name: Install dependency
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install --yes libeigen3-dev libjpeg-dev python3-pybind11
run: sudo apt-get install --yes libeigen3-dev libjpeg-dev
# Didn't test pybind11. Seems to be old and incompatible with the python version.

- name: Build with make
if: matrix.install_from == 'make'
Expand Down
4 changes: 0 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,4 @@ find_package(pybind11 CONFIG)
if(Python3_Development_FOUND AND BUILD_SHARED_LIBS AND pybind11_FOUND)
pybind11_add_module(pyopenpano python/pybind.cc)
target_link_libraries(pyopenpano PRIVATE openpano)
#add_library(pyopenpano SHARED python/pybind.cc)
#target_include_directories(pyopenpano SYSTEM
#PRIVATE ${Python3_INCLUDE_DIRS}
#)
endif()
2 changes: 1 addition & 1 deletion src/lib/timer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ std::map<std::string, std::pair<int, double>> TotalTimer::rst;

void TotalTimer::print() {
for (auto& itr : rst)
print_debug("%s spent %lf secs in total, called %d times.\n",
print_debug("%s spent %.2lf secs in total, called %d times.\n",
itr.first.c_str(), itr.second.second, itr.second.first);
}

Expand Down
3 changes: 2 additions & 1 deletion src/lib/timer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <chrono>
#include <functional>
#include <map>
#include <iomanip>
#include <iostream>
#include <string>

Expand Down Expand Up @@ -35,7 +36,7 @@ class GuardedTimer: public Timer {
public:
GuardedTimer(const std::string& msg, bool enabled=true):
GuardedTimer([msg](double duration){
std::cout << msg << ": " << std::to_string(duration * 1000.) << " milliseconds." << std::endl;
std::cout << msg << ": " << std::fixed << std::setprecision(1) << duration * 1000. << " milliseconds." << std::endl;
})
{ enabled_ = enabled; }

Expand Down

0 comments on commit b88764d

Please sign in to comment.