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.
 
 
 
 
 
 

92 lines
2.4 KiB

  1. # SPDX-License-Identifier: GPL-2.0+
  2. # Copyright Marek Vasut <marex@denx.de>
  3. # OpenOCD on Travis CI - https://travis-ci.org/
  4. sudo: required
  5. dist: bionic
  6. arch:
  7. - amd64
  8. - arm64
  9. - ppc64le
  10. - s390x
  11. addons:
  12. apt:
  13. sources:
  14. - sourceline: 'ppa:ubuntu-toolchain-r/test'
  15. - sourceline: 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
  16. key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
  17. packages:
  18. - libftdi-dev
  19. - libhidapi-dev
  20. - libjaylink-dev
  21. env:
  22. - CC=gcc-9
  23. - CC=clang-9
  24. language: c
  25. git:
  26. depth: 1
  27. autocrlf: input
  28. script:
  29. - $mingw64 ${CC} --version
  30. - $mingw64 env
  31. - $mingw64 ./bootstrap
  32. - $mingw64 ./configure
  33. - $mingw64 make
  34. before_install:
  35. - |-
  36. case $TRAVIS_OS_NAME in
  37. linux)
  38. sudo apt install ${CC} libusb-1.0-0-dev
  39. ;;
  40. osx)
  41. brew install libtool automake libusb libusb-compat hidapi libftdi
  42. ;;
  43. windows)
  44. [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64
  45. choco uninstall -y mingw
  46. choco upgrade --no-progress -y msys2
  47. export msys2='cmd //C RefreshEnv.cmd '
  48. export msys2+='& set MSYS=winsymlinks:nativestrict '
  49. export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
  50. export mingw64="$msys2 -mingw64 -full-path -here -c \$\* --"
  51. export msys2+=" -msys2 -c \$\* --"
  52. $msys2 pacman --sync --noconfirm --needed mingw-w64-x86_64-toolchain autoconf autoconf-archive automake automake-wrapper binutils gcc gettext git libtool m4 make pkg-config tcl texinfo mingw-w64-x86_64-libusb mingw-w64-x86_64-libusb-compat-git mingw-w64-x86_64-libjaylink-git mingw-w64-x86_64-libftdi mingw-w64-x86_64-hidapi mingw-w64-x86_64-clang
  53. ## FIXME: Also build for i686?
  54. ## Install more MSYS2 packages from https://packages.msys2.org/base here
  55. taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967
  56. export PATH=/C/tools/msys64/mingw64/bin:$PATH
  57. export MAKE=mingw32-make # so that Autotools can find it
  58. ;;
  59. esac
  60. before_cache:
  61. - |-
  62. case $TRAVIS_OS_NAME in
  63. windows)
  64. # https://unix.stackexchange.com/a/137322/107554
  65. $msys2 pacman --sync --clean --noconfirm
  66. ;;
  67. esac
  68. cache:
  69. directories:
  70. - $HOME/AppData/Local/Temp/chocolatey
  71. - /C/tools/msys64
  72. matrix:
  73. include:
  74. - os: osx
  75. env:
  76. - CC=clang
  77. - os: windows
  78. env:
  79. - CC=gcc