.travis.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. sudo: required
  2. branches:
  3. only:
  4. - master
  5. cache:
  6. directories:
  7. - ~/.ccache
  8. - ~/.pkg-cache
  9. - blender-addons-contrib.git
  10. - blender-addons.git
  11. - blender-dev-tools.git
  12. - blender-translations.git
  13. - blender
  14. services:
  15. - docker
  16. archlinux:
  17. mount:
  18. - ~/.ccache:~/.ccache
  19. - ~/.pkg-cache:/var/cache/pacman/pkg
  20. repos:
  21. - bartus=https://github.com/bartoszek/AUR-repo/raw/master
  22. packages:
  23. - ccache
  24. - moreutils
  25. - cuda
  26. before_install:
  27. # Override `package-cleanup.hook` to preserve cache for travis.
  28. # Enable ccache
  29. # Multithreaded build and compress
  30. # Suppress all gcc warnings
  31. - |
  32. sudo mkdir /etc/pacman.d/hooks/
  33. sudo ln -s /dev/null /etc/pacman.d/hooks/package-cleanup.hook
  34. sudo sed -i '/#MAKEFLAGS=/c MAKEFLAGS="-j2"' /etc/makepkg.conf
  35. sudo sed -i '/^BUILDENV/s/\!ccache/ccache/' /etc/makepkg.conf
  36. sudo sed -i '/^COMPRESSXZ/s/\xz/xz -T 2/' /etc/makepkg.conf
  37. sudo sed -i '$a CFLAGS="$CFLAGS -w"' /etc/makepkg.conf
  38. sudo sed -i '$a CXXFLAGS="$CXXFLAGS -w"' /etc/makepkg.conf
  39. script:
  40. # Incorporate ccache in nvcc
  41. - |
  42. _gcc="$(readlink /opt/cuda/bin/gcc)"
  43. _gpp="$(readlink /opt/cuda/bin/g++)"
  44. sudo mv /opt/cuda/bin/nvcc /opt/cuda/bin/nvcc.bin
  45. sudo rm /opt/cuda/bin/g{cc,++}
  46. echo -e "#!/bin/sh -\n/usr/bin/ccache /opt/cuda/bin/nvcc.bin \"\$@\"" | sudo dd of=/opt/cuda/bin/nvcc
  47. echo -e "#!/bin/sh -\n/usr/bin/ccache $_gcc \"\$@\"" | sudo dd of=/opt/cuda/bin/gcc
  48. echo -e "#!/bin/sh -\n/usr/bin/ccache $_gpp \"\$@\"" | sudo dd of=/opt/cuda/bin/g++
  49. sudo chmod +x /opt/cuda/bin/{nvcc,g{cc,++}}
  50. # Normalize TRAVIS variable
  51. - |
  52. [ "$TRAVIS" == "true" ] && TRAVIS=1 || TRAVIS=0
  53. # Build
  54. - ccache -s
  55. - timeout 35m makepkg -s --noconfirm | ts -s '[%.T]'; _makepkg_return=${PIPESTATUS[0]}
  56. - ccache -s
  57. - exit $_makepkg_return
  58. script:
  59. - "curl -s https://raw.githubusercontent.com/bartoszek/arch-travis/master/arch-travis.sh| bash"
  60. - "echo pacman pkg cache size: $(du -h ~/.pkg-cache|cut -f1) in $(ls ~/.pkg-cache|wc -l) files"
  61. #deploy:
  62. # on:
  63. # branch: master
  64. # skip_cleanup: true
  65. # provider: script
  66. # script: bash .travis_deploy.sh