forked from MIPT-ILab/mipt-mips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
86 lines (77 loc) · 2.61 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
notifications:
email: false
language: cpp
dist: xenial
osx_image: xcode10.1
branches:
only:
- master
compiler:
- gcc
- clang
os:
- linux
- osx
matrix:
exclude:
- os: osx
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main
update: true
packages:
- libboost-dev
- ninja-build
homebrew:
packages:
- ninja
update: true
install:
- pip install --user future
- |
if [ $CXX == g++ ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install g++-7
CXX=g++-7
fi
- |
if [ $CXX == clang++ ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install libstdc++-7-dev
fi
# Download GDB
- wget http://ftp.gnu.org/gnu/gdb/gdb-8.3.tar.gz
- tar -xzf gdb-8.3.tar.gz
before_script:
- cd $TRAVIS_BUILD_DIR/simulator && mkdir debug release
- cd $TRAVIS_BUILD_DIR/simulator/release && cmake .. -DCMAKE_BUILD_TYPE=Release -DGDB_SOURCE_PATH=$TRAVIS_BUILD_DIR/gdb-8.3 -G "Ninja"
# Prepare for GDB build
- cd $TRAVIS_BUILD_DIR/gdb-8.3 && ./configure --target=mipsel-unknown-linux --with-system-zlib --with-python=no
- cd $TRAVIS_BUILD_DIR/gdb-8.3 && make configure-gdb CFLAGS='-w -O0' CXXFLAGS='-w -O0' MAKEINFO=true > /dev/null
- cd $TRAVIS_BUILD_DIR/gdb-8.3/opcodes && ./configure --target=mipsel-unknown-linux && make libopcodes.a
- cd $TRAVIS_BUILD_DIR/gdb-8.3/libdecnumber && ./configure && make libdecnumber.a
- cd $TRAVIS_BUILD_DIR/gdb-8.3/readline && ./configure && make libreadline.a
script:
- cd $TRAVIS_BUILD_DIR/simulator/release
- ninja mipt-mips unit-tests
- ctest --verbose
- ./mipt-mips -b $TRAVIS_BUILD_DIR/tests/mips-fib.bin -n 1000000 --mars
- cd $TRAVIS_BUILD_DIR/gdb-8.3/gdb
- make gdb CFLAGS='-w -O0' CXXFLAGS='-w -O0' MAKEINFO=true > /dev/null
- ./gdb -x $TRAVIS_BUILD_DIR/tests/test.gdb --args $TRAVIS_BUILD_DIR/tests/mips-tt.bin
after_success:
- |
if [ $CXX == clang++ ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get install clang-tidy-9 --allow-unauthenticated
cd $TRAVIS_BUILD_DIR/simulator/debug
cmake .. -DCMAKE_BUILD_TYPE=Release
run-clang-tidy-9.py -header-filter='.*' 2> /dev/null
fi
- |
if [ $CXX == g++-7 ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
cd $TRAVIS_BUILD_DIR/simulator/debug
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=1 -G "Ninja"
ninja unit-tests && ctest
bash <(curl -s https://codecov.io/bash) > /dev/null || echo "Codecov did not collect coverage reports"
fi