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

Use clang-format from CI base image #6391

Merged
merged 5 commits into from
Oct 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
4 changes: 1 addition & 3 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ jobs:
- name: Prepare environment
run: |
npm ci --ignore-scripts
export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
${MASON} install clang-format 10.0.0
echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
clang-format-10 --version
- name: Run checks
run: |
./scripts/check_taginfo.py taginfo.json profiles/car.lua
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Thumbs.db
/.vs*
/*.local.bat
/CMakeSettings.json
/.cache
Copy link
Member Author

Choose a reason for hiding this comment

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

It is from VSCode plugin I've been using, I think it is okay to have it here, but not in separate PR(but let me know if it is not)


# Jetbrains related files #
###########################
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- FIXED: Bug in bicycle profile that caused exceptions if there is a highway=bicycle in the data. [#6296](https://github.com/Project-OSRM/osrm-backend/pull/6296)
- FIXED: Internal refactoring of identifier types used in data facade [#6044](https://github.com/Project-OSRM/osrm-backend/pull/6044)
- Build:
- CHANGED: Use clang-format from CI base image. [#6391](https://github.com/Project-OSRM/osrm-backend/pull/6391)
- ADDED: Build Node bindings on Windows. [#6334](https://github.com/Project-OSRM/osrm-backend/pull/6334)
- ADDED: Configure cross-compilation for Apple Silicon. [#6360](https://github.com/Project-OSRM/osrm-backend/pull/6360)
- CHANGED: Use apt-get to install Clang on CI. [#6345](https://github.com/Project-OSRM/osrm-backend/pull/6345)
Expand Down
6 changes: 3 additions & 3 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ elif [[ ${OS} = "Darwin" ]] ; then
fi

# Discover clang-format
if type clang-format-10.0.0 2> /dev/null ; then
CLANG_FORMAT=clang-format-10.0.0
if type clang-format-10 2> /dev/null ; then
CLANG_FORMAT=clang-format-10
elif type clang-format 2> /dev/null ; then
# Clang format found, but need to check version
CLANG_FORMAT=clang-format
Expand All @@ -30,7 +30,7 @@ elif type clang-format 2> /dev/null ; then
#exit 1
fi
else
echo "No appropriate clang-format found (expected clang-format-10.0.0, or clang-format)"
echo "No appropriate clang-format found (expected clang-format-10, or clang-format)"
exit 1
fi

Expand Down