Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to clang-tidy 15 #6439

Merged
merged 18 commits into from
Nov 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Checks: >
-llvm-twine-local,
misc-*,
-misc-argument-comment,
-misc-const-correctness,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-misc-non-private-member-variables-in-classes,
-misc-unconventional-assign-operator,
-misc-no-recursion,
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@ jobs:
CXXCOMPILER: clang++-6.0
CUCUMBER_TIMEOUT: 60000

- name: clang-11.0-debug-clang-tidy
- name: clang-15.0-debug-clang-tidy
continue-on-error: false
node: 16
runs-on: ubuntu-22.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: clang-14
CXXCOMPILER: clang++-14
CCOMPILER: clang-15
CXXCOMPILER: clang++-15
CUCUMBER_TIMEOUT: 60000
ENABLE_CLANG_TIDY: ON

Expand Down Expand Up @@ -507,10 +507,11 @@ jobs:
- name: Install dev dependencies
run: |
python3 -m pip install conan==1.53.0

# workaround for issue that GitHub Actions seems to not adding it to PATH after https://github.com/actions/runner-images/pull/6499
# and that's why CI cannot find conan executable installed above
if [[ "${RUNNER_OS}" == "macOS" ]]; then
echo "/Library/Frameworks/Python.framework/Versions/3.11/bin" >> $GITHUB_PATH
echo "/Library/Frameworks/Python.framework/Versions/Current/bin" >> $GITHUB_PATH
fi

# ccache
Expand All @@ -523,6 +524,12 @@ jobs:
# clang
if [[ "${CCOMPILER}" == "clang-6.0" ]]; then
sudo apt-get update -y && sudo apt-get install clang++-6
elif [[ "${CCOMPILER}" == "clang-15" ]]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update -y && sudo apt-get install software-properties-common
sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main'
sudo apt-get update -y && sudo apt-get install clang++-15 clang-tidy-15
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 100000
fi

# Linux dev packages
Expand Down Expand Up @@ -551,7 +558,6 @@ jobs:
tar zxvf onetbb.tgz
sudo cp -a oneapi-tbb-${TBB_VERSION}/lib/. /usr/local/lib/
sudo cp -a oneapi-tbb-${TBB_VERSION}/include/. /usr/local/include/

- name: Prepare build
run: |
mkdir ${OSRM_BUILD_DIR}
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Unreleased
- Changes from 5.27.1
- Build:
- CHANGED: Upgrade to clang-tidy 15. [#6439](https://github.com/Project-OSRM/osrm-backend/pull/6439)
- CHANGED: Update actions/cache to v3. [#6420](https://github.com/Project-OSRM/osrm-backend/pull/6420)
- REMOVED: Drop support of Node 12 & 14. [#6431](https://github.com/Project-OSRM/osrm-backend/pull/6431)
- Misc:
Expand Down
2 changes: 0 additions & 2 deletions src/contractor/graph_contractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,6 @@ std::vector<bool> contractGraph(ContractorGraph &graph,

const util::XORFastHash<> hash;

unsigned current_level = 0;
std::size_t next_renumbering = number_of_nodes * 0.35;
while (remaining_nodes.size() > number_of_core_nodes)
{
Expand Down Expand Up @@ -761,7 +760,6 @@ std::vector<bool> contractGraph(ContractorGraph &graph,
remaining_nodes.resize(begin_independent_nodes_idx);

p.PrintStatus(number_of_contracted_nodes);
++current_level;
}

node_data.Renumber(new_to_old_node_id);
Expand Down