From 907c22aa1280897b4e99b2993899cbe4773f8f2e Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Sat, 25 Aug 2018 11:25:21 +0100 Subject: Move to CircleCI-2.0 (#4225) --- .circleci/config.yml | 41 +++++++++++++++++++++++++++++++++++++++++ circle.yml | 20 -------------------- clang-tidy.sh | 3 +-- 3 files changed, 42 insertions(+), 22 deletions(-) create mode 100644 .circleci/config.yml delete mode 100644 circle.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 000000000..d563a70db --- /dev/null +++ b/.circleci/config.yml @@ -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 diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 3a8cac12b..000000000 --- a/circle.yml +++ /dev/null @@ -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 diff --git a/clang-tidy.sh b/clang-tidy.sh index 34cfb26e7..62fe6fc38 100755 --- a/clang-tidy.sh +++ b/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 -- cgit v1.2.3