提交 8b7421b2 编写于 作者: J Jesse Zhang

[Travis] Checks formatting in Travis.

Add a stage called "check-format" that runs before the fan-out of
installcheck-small. While we're at it, also enforce that the full config
file is generated from the intent file. This should be fairly quick. On
my laptop, the `fmt chk` step takes 3 seconds. (On this backbranch, it
actually takes 1 second on my laptop).

Care has been taken to add back the matrix syntax in Travis CI config so
it's still valid. Also subtle is the explicit mention of the "test"
stage in the matrix so as not to lose it in the expansion, as this
backbranch effectively doesn't have a build matrix (every "matrix key"
has at most one value).

Enforcement in Concourse is forthcoming.

(cherry picked from commit 54273fdd)
上级 310c3674
......@@ -33,6 +33,34 @@ addons:
- libevent-dev
- libapr1-dev
matrix:
include:
- stage: test
- stage: check-format
os: linux
dist: bionic
addons:
apt:
sources:
- *common_sources
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- clang-format-10
- parallel
before_install: ~
install: ~
before_script: ~
after_script: ~
script:
- env CLANG_FORMAT=clang-format-10 src/tools/fmt gen
- git diff --exit-code
- env CLANG_FORMAT=clang-format-10 src/tools/fmt chk
stages:
- check-format
- test
## ----------------------------------------------------------------------
## Build tools
## ----------------------------------------------------------------------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册