1
0

Move to CircleCI-2.0 (#4225)

This commit is contained in:
peterbell10 2018-08-25 11:25:21 +01:00 committed by Alexander Harkness
parent a1e52cb6d6
commit 907c22aa12
3 changed files with 42 additions and 22 deletions

41
.circleci/config.yml Normal file
View File

@ -0,0 +1,41 @@
version: 2
jobs:
checkout_cuberite:
working_directory: ~/cuberite
docker: &cube_docker
- image: cuberite/docker-build-image:circle-ci
steps:
- checkout
- run: git submodule update --init
- save_cache:
key: "cuberite-{{ .Environment.CIRCLE_SHA1 }}"
paths:
- ~/cuberite
check_basic_style:
working_directory: ~/cuberite/src
docker: *cube_docker
steps:
- restore_cache: { keys: [ "cuberite-{{ .Environment.CIRCLE_SHA1 }}" ] }
- run: find . -name \*.cpp -or -name \*.h > AllFiles.lst
- run: lua CheckBasicStyle.lua
- run: cd Bindings && lua CheckBindingsDependencies.lua
clang-tidy:
working_directory: ~/cuberite
docker: *cube_docker
steps:
- restore_cache: { keys: [ "cuberite-{{ .Environment.CIRCLE_SHA1 }}" ] }
- run: ./clang-tidy.sh -j 2
workflows:
version: 2
checks:
jobs:
- checkout_cuberite
- check_basic_style:
requires:
- checkout_cuberite
- clang-tidy:
requires:
- checkout_cuberite

View File

@ -1,20 +0,0 @@
# This is the YML file that governs the CI builds at CircleCI.com
# The CI is used only for style-checking at this moment.
dependencies:
pre:
- sudo apt-get update
- sudo apt-get install lua5.1 cmake clang-3.9 clang-tidy-3.9
- sudo ln -s /usr/bin/clang-tidy-3.9 /usr/bin/clang-tidy
- sudo ln -s /usr/bin/clang-apply-replacements-3.9 /usr/bin/clang-apply-replacements
- pip install PyYAML
test:
override:
- cd src && find . -name \*.cpp -or -name \*.h > AllFiles.lst && lua CheckBasicStyle.lua
- cd src/Bindings && lua CheckBindingsDependencies.lua
- curl -o "$HOME/bin/run-clang-tidy.py" "https://raw.githubusercontent.com/llvm-mirror/clang-tools-extra/45fb9b20ed7da2f6b95d83e5ef45bb536f49d8ca/clang-tidy/tool/run-clang-tidy.py"
- chmod +x "$HOME/bin/run-clang-tidy.py"
- git submodule update --init
- ./clang-tidy.sh

View File

@ -4,8 +4,7 @@ set -e
FIXES_FILE="tidy-fixes.yaml"
REGEX="/cuberite/src/\.?[^\.]"
# TODO: Add -quiet when Circle CI is updated to 2.0 with a newer version of Ubuntu
ARGS="-header-filter $REGEX -export-fixes $FIXES_FILE "$@" $REGEX"
ARGS="-header-filter $REGEX -quiet -export-fixes $FIXES_FILE "$@" $REGEX"
mkdir -p tidy-build
cd tidy-build