Skip to content

Commit

Permalink
Disables logging in CI to catch issues (valhalla#3121)
Browse files Browse the repository at this point in the history
* Disables logging in CI to catch issues

with ununsed variables
  • Loading branch information
purew committed Jun 2, 2021
1 parent 8b3297c commit c2f9528
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
&& cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=On -DCPACK_GENERATOR=DEB \
-DENABLE_COMPILER_WARNINGS=On -DENABLE_WERROR=Off -DCMAKE_EXPORT_COMPILE_COMMANDS=On \
-DCMAKE_CXX_FLAGS="-fuse-ld=lld" \
-DLOGGING_LEVEL=NONE \
-DENABLE_PYTHON_BINDINGS=On
- run: python3 ./scripts/valhalla_build_config
- run: make -C build -j8
Expand Down Expand Up @@ -107,6 +108,7 @@ jobs:
- run: mkdir build
- run: |
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=On -DENABLE_PYTHON_BINDINGS=On \
-DLOGGING_LEVEL=TRACE \
-DCPACK_GENERATOR=DEB -DCPACK_PACKAGE_VERSION_SUFFIX="-0ubuntu1-$(lsb_release -sc)" -DENABLE_SANITIZERS=ON
- run: make -C build -j8
- run: make -C build utrecht_tiles
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
* **Bug Fix**
* FIXED: Fix heading on small edge [#3114](https://github.com/valhalla/valhalla/pull/3114)
* FIXED: Added support for `access=psv`, which disables routing on these nodes and edges unless the mode is taxi or bus [#3107](https://github.com/valhalla/valhalla/pull/3107)
* FIXED: Disables logging in CI to catch issues [#3121](https://github.com/valhalla/valhalla/pull/3121)
* FIXED: Fixed U-turns through service roads [#3082](https://github.com/valhalla/valhalla/pull/3082)
* FIXED: Added forgotten penalties for kLivingStreet and kTrack for pedestrian costing model [#3116](https://github.com/valhalla/valhalla/pull/3116)


* **Enhancement**

## Release Date: 2021-05-26 Valhalla 3.1.2
Expand Down
3 changes: 1 addition & 2 deletions src/midgard/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ std::vector<PointLL> uniform_resample_spherical_polyline(const std::vector<Point
// Compute sample distance that splits the polyline equally to create n vertices.
// Divisor is n-1 since there is 1 more vertex than edge on the subdivided polyline.
double sample_distance = length / (n - 1);
double d0 = sample_distance;

// for each point
std::vector<PointLL> resampled = {polyline.front()};
Expand Down Expand Up @@ -391,7 +390,7 @@ std::vector<PointLL> uniform_resample_spherical_polyline(const std::vector<Point
if (resampled.size() != n) {
LOG_ERROR("resampled polyline not expected size! n: " + std::to_string(n) +
" actual: " + std::to_string(resampled.size()) + " length: " + std::to_string(length) +
" d: " + std::to_string(d0));
" d: " + std::to_string(sample_distance));
}
return resampled;
}
Expand Down
3 changes: 3 additions & 0 deletions src/mjolnir/bssbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ void add_bss_nodes_and_edges(GraphTileBuilder& tilebuilder_local,
auto scoped_finally = make_finally([&tilebuilder_local, &tile, &lock]() {
LOG_INFO("Storing local tile data with bss nodes, tile id: " +
std::to_string(tile.id().tileid()));
UNUSED(tile);
std::lock_guard<std::mutex> l(lock);
tilebuilder_local.StoreTileData();
});
Expand Down Expand Up @@ -362,6 +363,8 @@ void create_edges(GraphTileBuilder& tilebuilder_local,

LOG_INFO("Tile id: " + std::to_string(tile.id().tileid()) + " It took " + std::to_string(secs) +
" seconds to create edges. Now storing local tile data with new edges");
UNUSED(tile);
UNUSED(secs);
std::lock_guard<std::mutex> l(lock);
tilebuilder_local.StoreTileData();
});
Expand Down
2 changes: 0 additions & 2 deletions src/mjolnir/ferry_connections.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include "baldr/graphconstants.h"
#include "midgard/util.h"

#define UNUSED(x) (void)(x)

namespace valhalla {
namespace mjolnir {

Expand Down
6 changes: 4 additions & 2 deletions src/mjolnir/transitbuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ void ConnectToGraph(GraphTileBuilder& tilebuilder_local,

// Log the number of added nodes and edges
auto t2 = std::chrono::high_resolution_clock::now();
uint32_t msecs = std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count();
LOG_INFO("Tile " + std::to_string(tilebuilder_local.header()->graphid().tileid()) + ": added " +
std::to_string(connedges) + " connection edges, " + std::to_string(nodecount) +
" nodes. time = " + std::to_string(msecs) + " ms");
" nodes. time = " +
std::to_string(std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count()) +
" ms");
}

// Fallback to find connection edges from the transit stop to an OSM edge.
Expand Down Expand Up @@ -559,6 +560,7 @@ void AddOSMConnection(const GraphId& transit_stop_node,
" Start Node Tile: " + std::to_string(startnode.tileid()) +
" End Node Tile: " + std::to_string(endnode.tileid()));
}
UNUSED(stop_name);
}

// We make sure to lock on reading and writing since tiles are now being
Expand Down
2 changes: 1 addition & 1 deletion src/odin/maneuver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,7 @@ std::string Maneuver::ToString() const {
for (const auto& guidance_view : guidance_views_) {
man_str += "[";
man_str += " data_id=" + guidance_view.data_id();
man_str += " type=" + guidance_view.type();
man_str += " type=" + std::to_string(guidance_view.type());
man_str += " base_id=" + guidance_view.base_id();
man_str += " overlay_ids=";
for (const auto& overlay_id : guidance_view.overlay_ids()) {
Expand Down
4 changes: 2 additions & 2 deletions src/thor/bidirectional_astar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,8 @@ std::vector<std::vector<PathInfo>> BidirectionalAStar::FormPath(GraphReader& gra
printf("graphreader.GetGraphTile(nodes.first) is null\n");
continue;
}
auto sll = first_node_tile->node(nodes.first)
->latlng(graphreader.GetGraphTile(nodes.first)->header()->base_ll());

auto sll = first_node_tile->node(nodes.first)->latlng(first_node_tile->header()->base_ll());

auto second_node_tile = graphreader.GetGraphTile(nodes.second);
if (second_node_tile == nullptr) {
Expand Down
2 changes: 2 additions & 0 deletions valhalla/midgard/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <valhalla/midgard/tiles.h>
#include <valhalla/midgard/util_core.h>

#define UNUSED(x) (void)(x)

namespace valhalla {
namespace midgard {

Expand Down

0 comments on commit c2f9528

Please sign in to comment.