You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.travis.yml 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. # The current Travis default is a VM based 16.04 Xenial on GCE
  2. # Additional builds with specific requirements for a full VM need to
  3. # be added as additional matrix: entries later on
  4. dist: xenial
  5. language: c
  6. compiler:
  7. - gcc
  8. cache:
  9. # There is one cache per branch and compiler version.
  10. # characteristics of each job are used to identify the cache:
  11. # - OS name (currently, linux, osx, or windows)
  12. # - OS distribution (for Linux, xenial, trusty, or precise)
  13. # - macOS image name (e.g., xcode7.2)
  14. # - Names and values of visible environment variables set in .travis.yml or Settings panel
  15. timeout: 1200
  16. ccache: true
  17. pip: true
  18. directories:
  19. - $HOME/avocado/data/cache
  20. addons:
  21. apt:
  22. packages:
  23. # Build dependencies
  24. - libaio-dev
  25. - libattr1-dev
  26. - libbrlapi-dev
  27. - libcap-dev
  28. - libcap-ng-dev
  29. - libgcc-4.8-dev
  30. - libgnutls-dev
  31. - libgtk-3-dev
  32. - libiscsi-dev
  33. - liblttng-ust-dev
  34. - libncurses5-dev
  35. - libnfs-dev
  36. - libnss3-dev
  37. - libpixman-1-dev
  38. - libpng12-dev
  39. - librados-dev
  40. - libsdl1.2-dev
  41. - libseccomp-dev
  42. - libspice-protocol-dev
  43. - libspice-server-dev
  44. - libssh-dev
  45. - liburcu-dev
  46. - libusb-1.0-0-dev
  47. - libvte-2.91-dev
  48. - sparse
  49. - uuid-dev
  50. - gcovr
  51. homebrew:
  52. packages:
  53. - ccache
  54. - glib
  55. - pixman
  56. - gnu-sed
  57. update: true
  58. # The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
  59. # to prevent IRC notifications from forks. This was created using:
  60. # $ travis encrypt -r "qemu/qemu" "irc.oftc.net#qemu"
  61. notifications:
  62. irc:
  63. channels:
  64. - secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
  65. on_success: change
  66. on_failure: always
  67. env:
  68. global:
  69. - SRC_DIR="."
  70. - BUILD_DIR="."
  71. - BASE_CONFIG="--disable-docs --disable-tools"
  72. - TEST_CMD="make check -j3 V=1"
  73. # This is broadly a list of "mainline" softmmu targets which have support across the major distros
  74. - MAIN_SOFTMMU_TARGETS="aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
  75. - CCACHE_SLOPPINESS="include_file_ctime,include_file_mtime"
  76. - CCACHE_MAXSIZE=1G
  77. git:
  78. # we want to do this ourselves
  79. submodules: false
  80. before_script:
  81. - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
  82. - command -v ccache && ccache --zero-stats
  83. - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
  84. - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
  85. script:
  86. - make -j3 && travis_retry ${TEST_CMD}
  87. after_script:
  88. - command -v ccache && ccache --show-stats
  89. matrix:
  90. include:
  91. - env:
  92. - CONFIG="--disable-system --static"
  93. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  94. # we split the system builds as it takes a while to build them all
  95. - env:
  96. - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
  97. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  98. - env:
  99. - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
  100. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  101. # Just build tools and run minimal unit and softfloat checks
  102. - env:
  103. - BASE_CONFIG="--enable-tools"
  104. - CONFIG="--disable-user --disable-system"
  105. - TEST_CMD="make check-unit check-softfloat -j3"
  106. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  107. - env:
  108. - CONFIG="--enable-debug --enable-debug-tcg --disable-user"
  109. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
  110. # TCG debug can be run just on it's own and is mostly agnostic to user/softmmu distinctions
  111. - env:
  112. - CONFIG="--enable-debug-tcg --disable-system"
  113. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
  114. - env:
  115. - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-libusb --disable-replication --target-list=${MAIN_SOFTMMU_TARGETS}"
  116. # Module builds are mostly of interest to major distros
  117. - env:
  118. - CONFIG="--enable-modules --target-list=${MAIN_SOFTMMU_TARGETS}"
  119. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  120. # Alternate coroutines implementations are only really of interest to KVM users
  121. # However we can't test against KVM on Travis so we can only run unit tests
  122. - env:
  123. - CONFIG="--with-coroutine=ucontext --disable-tcg"
  124. - TEST_CMD="make check-unit -j3 V=1"
  125. - env:
  126. - CONFIG="--with-coroutine=sigaltstack --disable-tcg"
  127. - TEST_CMD="make check-unit -j3 V=1"
  128. # Check we can build docs and tools (out of tree)
  129. - env:
  130. - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
  131. - BASE_CONFIG="--enable-tools --enable-docs"
  132. - CONFIG="--target-list=x86_64-softmmu,aarch64-linux-user"
  133. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  134. addons:
  135. apt:
  136. packages:
  137. - python-sphinx
  138. - texinfo
  139. - perl
  140. # Test with Clang for compile portability (Travis uses clang-5.0)
  141. - env:
  142. - CONFIG="--disable-system"
  143. - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
  144. compiler: clang
  145. - env:
  146. - CONFIG="--disable-user --target-list=${MAIN_SOFTMMU_TARGETS}"
  147. - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
  148. compiler: clang
  149. - env:
  150. - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} "
  151. compiler: clang
  152. before_script:
  153. - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; }
  154. - env:
  155. - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}"
  156. - CACHE_NAME="${TRAVIS_BRANCH}-linux-clang-default"
  157. compiler: clang
  158. # gprof/gcov are GCC features
  159. - env:
  160. - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=${MAIN_SOFTMMU_TARGETS}"
  161. after_success:
  162. - ${SRC_DIR}/scripts/travis/coverage-summary.sh
  163. # We manually include builds which we disable "make check" for
  164. - env:
  165. - CONFIG="--without-default-devices --disable-user"
  166. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  167. - TEST_CMD=""
  168. # We manually include builds which we disable "make check" for
  169. - env:
  170. - CONFIG="--enable-debug --enable-tcg-interpreter"
  171. - TEST_CMD=""
  172. # We don't need to exercise every backend with every front-end
  173. - env:
  174. - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
  175. - TEST_CMD=""
  176. - env:
  177. - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
  178. - TEST_CMD=""
  179. - env:
  180. - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
  181. - TEST_CMD=""
  182. # MacOSX builds
  183. - env:
  184. - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS}"
  185. os: osx
  186. osx_image: xcode9.4
  187. compiler: clang
  188. - env:
  189. - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu"
  190. os: osx
  191. osx_image: xcode10.2
  192. compiler: clang
  193. # Python builds
  194. - env:
  195. - CONFIG="--target-list=x86_64-softmmu"
  196. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  197. language: python
  198. python:
  199. - "3.4"
  200. - env:
  201. - CONFIG="--target-list=x86_64-softmmu"
  202. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  203. language: python
  204. python:
  205. - "3.6"
  206. # Acceptance (Functional) tests
  207. - env:
  208. - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu,m68k-softmmu"
  209. - TEST_CMD="make check-acceptance"
  210. after_failure:
  211. - cat tests/results/latest/job.log
  212. addons:
  213. apt:
  214. packages:
  215. - python3-pil
  216. - python3-pip
  217. - python3.5-venv
  218. - tesseract-ocr
  219. - tesseract-ocr-eng
  220. # Using newer GCC with sanitizers
  221. - addons:
  222. apt:
  223. update: true
  224. sources:
  225. # PPAs for newer toolchains
  226. - ubuntu-toolchain-r-test
  227. packages:
  228. # Extra toolchains
  229. - gcc-9
  230. - g++-9
  231. # Build dependencies
  232. - libaio-dev
  233. - libattr1-dev
  234. - libbrlapi-dev
  235. - libcap-ng-dev
  236. - libgnutls-dev
  237. - libgtk-3-dev
  238. - libiscsi-dev
  239. - liblttng-ust-dev
  240. - libnfs-dev
  241. - libncurses5-dev
  242. - libnss3-dev
  243. - libpixman-1-dev
  244. - libpng12-dev
  245. - librados-dev
  246. - libsdl1.2-dev
  247. - libseccomp-dev
  248. - libspice-protocol-dev
  249. - libspice-server-dev
  250. - libssh-dev
  251. - liburcu-dev
  252. - libusb-1.0-0-dev
  253. - libvte-2.91-dev
  254. - sparse
  255. - uuid-dev
  256. language: generic
  257. compiler: none
  258. env:
  259. - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9
  260. - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user"
  261. - TEST_CMD=""
  262. before_script:
  263. - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
  264. # Run check-tcg against linux-user
  265. - env:
  266. - CONFIG="--disable-system"
  267. - TEST_CMD="make -j3 check-tcg V=1"
  268. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
  269. # Run check-tcg against softmmu targets
  270. - env:
  271. - CONFIG="--target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
  272. - TEST_CMD="make -j3 check-tcg V=1"
  273. - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"