Move to CircleCI-2.0 (#4225)
This commit is contained in:
parent
a1e52cb6d6
commit
907c22aa12
41
.circleci/config.yml
Normal file
41
.circleci/config.yml
Normal 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
|
20
circle.yml
20
circle.yml
@ -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
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user