forked from nasa/ci_lab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (36 loc) · 1019 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
os: linux
dist: bionic
language: c
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
before_install:
- sudo apt-get install cppcheck
- cppcheck --version
# for clang-format 10
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
- sudo apt-get update
- sudo apt-get install clang-format-10
- clang-format-10 --version
script:
# Get bundle (doesn't populate submodules, not needed for style enforcement)
- cd ..
- git clone https://github.com/nasa/cFS.git
- mv ci_lab cFS/apps
- cd cFS/apps/ci_lab
# Enforce formatting
- find . -name "*.[ch]" -exec clang-format-10 -i -style=file {} +
- git diff > style_differences.txt
- |
if [[ -s style_differences.txt ]]; then
echo "You must fix style differences before submitting a pull request"
echo ""
cat style_differences.txt
exit -1
fi