forked from riscv-software-src/riscv-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (81 loc) · 3.31 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
language: cpp
# run on new infrastructure
sudo: false
cache: apt
# required packages to install
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- gperf
- autoconf
- automake
- autotools-dev
- libmpc-dev
- libmpfr-dev
- libgmp-dev
- gawk
- build-essential
- bison
- flex
- texinfo
- help2man
- python-pexpect
- libusb-1.0-0-dev
- device-tree-compiler
env:
global:
- RISCV="/home/travis/riscv_install"
- MAKEFLAGS="-j2"
- PATH="$TRAVIS_BUILD_DIR/.build/riscv64-unknown-elf/buildtools/bin:$PATH"
- PATH="/home/travis/riscv_install/bin:$PATH"
- CROSSTOOL_VERSION=1.24.0-rc3
before_install:
# make install destination
- mkdir -p $RISCV
# don't forget to clone riscv-tests/env
- cd riscv-tests
- git submodule update --init
- cd ..
# openocd also needs submodules
- cd riscv-openocd
- git submodule update --init
- cd ..
- unset CC CXX
# extra time duing long builds
install: travis_wait
# pexpect ends up in /usr/lib/python2.7/dist-packages, which is not part of the
# default python path.
script:
- mkdir ~/src
- curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-$CROSSTOOL_VERSION.tar.xz | tar -xJp
- cd crosstool-ng-$CROSSTOOL_VERSION; ./configure --prefix=$RISCV; cd ..
- make -C crosstool-ng-$CROSSTOOL_VERSION
- make -C crosstool-ng-$CROSSTOOL_VERSION install
- ct-ng riscv64-unknown-elf
- echo CT_CC_GCC_USE_GRAPHITE=n >> .config
- echo CT_ISL_NEEDED=n >> .config
- echo CT_ISL=n >> .config
- echo CT_MULTILIB=n >> .config
# Newlib download fails periodically, so retry the build a few times.
- travis_wait 100 ct-ng build || travis_wait 100 ct-ng build || travis_wait 100 ct-ng build
- which riscv64-unknown-elf-gcc
# Work around toolchain path issues
- cp .build/riscv64-unknown-elf/build/build-libc/riscv64-unknown-elf/libgloss/riscv/crt0.o .build/riscv64-unknown-elf/buildtools/lib/gcc/riscv64-unknown-elf/8.3.0
- cp -r .build/src/newlib-3.1.0.20181231/newlib/libc/include .build/riscv64-unknown-elf/buildtools/lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/include
- cp .build/riscv64-unknown-elf/build/build-libc/riscv64-unknown-elf/newlib/libm.a .build/riscv64-unknown-elf/buildtools/lib/gcc/riscv64-unknown-elf/8.3.0
- cp .build/riscv64-unknown-elf/build/build-libc/riscv64-unknown-elf/newlib/libc.a .build/riscv64-unknown-elf/buildtools/lib/gcc/riscv64-unknown-elf/8.3.0
- cp .build/riscv64-unknown-elf/build/build-libc/riscv64-unknown-elf/libgloss/riscv/libgloss.a .build/riscv64-unknown-elf/buildtools/lib/gcc/riscv64-unknown-elf/8.3.0
# Remove new autotools from path
- rm -f .build/riscv64-unknown-elf/buildtools/bin/automake*
- rm -f .build/riscv64-unknown-elf/buildtools/bin/aclocal*
# Actually build this repo
- ./build.sh
# Put compiler in expected place for debug tests
- ln -s $TRAVIS_BUILD_DIR/.build/riscv64-unknown-elf/buildtools/bin/riscv64-unknown-elf-gcc $RISCV/bin
- ln -s $TRAVIS_BUILD_DIR/.build/riscv64-unknown-elf/build/build-gdb-cross/gdb/gdb $RISCV/bin/riscv64-unknown-elf-gdb
# Run debug tests. Currently we expect 11 failures.
- PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages make -C riscv-tests/build debug-check | grep "11 tests returned fail"