Use clang-format from CI base image
This commit is contained in:
parent
21888334dd
commit
fd299348b0
6
.github/workflows/osrm-backend.yml
vendored
6
.github/workflows/osrm-backend.yml
vendored
@ -88,9 +88,9 @@ jobs:
|
|||||||
- name: Prepare environment
|
- name: Prepare environment
|
||||||
run: |
|
run: |
|
||||||
npm ci --ignore-scripts
|
npm ci --ignore-scripts
|
||||||
export MASON=${GITHUB_WORKSPACE}/scripts/mason.sh
|
which clang-format
|
||||||
${MASON} install clang-format 10.0.0
|
ls /usr/bin
|
||||||
echo "$(${MASON} prefix clang-format 10.0.0)/bin" >> $GITHUB_PATH
|
clang-format-14 --version
|
||||||
- name: Run checks
|
- name: Run checks
|
||||||
run: |
|
run: |
|
||||||
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -67,6 +67,7 @@ Thumbs.db
|
|||||||
/.vs*
|
/.vs*
|
||||||
/*.local.bat
|
/*.local.bat
|
||||||
/CMakeSettings.json
|
/CMakeSettings.json
|
||||||
|
/.cache
|
||||||
|
|
||||||
# Jetbrains related files #
|
# Jetbrains related files #
|
||||||
###########################
|
###########################
|
||||||
|
|||||||
@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Discover clang-format
|
# Discover clang-format
|
||||||
if type clang-format-10.0.0 2> /dev/null ; then
|
if type clang-format-14 2> /dev/null ; then
|
||||||
CLANG_FORMAT=clang-format-10.0.0
|
CLANG_FORMAT=clang-format-14
|
||||||
elif type clang-format 2> /dev/null ; then
|
elif type clang-format 2> /dev/null ; then
|
||||||
# Clang format found, but need to check version
|
# Clang format found, but need to check version
|
||||||
CLANG_FORMAT=clang-format
|
CLANG_FORMAT=clang-format
|
||||||
V=$(clang-format --version)
|
V=$(clang-format --version)
|
||||||
if [[ $V != *10.0* ]] ; then
|
if [[ $V != *14.0* ]] ; then
|
||||||
echo "clang-format is not 10.0 (returned ${V})"
|
echo "clang-format is not 14.0 (returned ${V})"
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
else
|
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-14, or clang-format)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user