.travis.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Facebook projects that use `fbcode_builder` for continuous integration
  2. # share this Travis configuration to run builds via Docker.
  3. sudo: required
  4. # Docker disables IPv6 in containers by default. Enable it for unit tests that need [::1].
  5. before_script:
  6. # `daemon.json` is normally missing, but let's log it in case that changes.
  7. - sudo touch /etc/docker/daemon.json
  8. - sudo cat /etc/docker/daemon.json
  9. - sudo service docker stop
  10. # This needs YAML quoting because of the curly braces.
  11. - 'echo ''{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}'' | sudo tee /etc/docker/daemon.json'
  12. - sudo service docker start
  13. # Fail early if docker failed on start -- add `- sudo dockerd` to debug.
  14. - sudo docker info
  15. # Paranoia log: what if our config got overwritten?
  16. - sudo cat /etc/docker/daemon.json
  17. env:
  18. global:
  19. - travis_cache_dir=$HOME/travis_ccache
  20. # Travis times out after 50 minutes. Very generously leave 10 minutes
  21. # for setup (e.g. cache download, compression, and upload), so we never
  22. # fail to cache the progress we made.
  23. - docker_build_timeout=40m
  24. cache:
  25. # Our build caches can be 200-300MB, so increase the timeout to 7 minutes
  26. # to make sure we never fail to cache the progress we made.
  27. timeout: 420
  28. directories:
  29. - $HOME/travis_ccache # see docker_build_with_ccache.sh
  30. # Ugh, `services:` must be in the matrix, or we get `docker: command not found`
  31. # https://github.com/travis-ci/travis-ci/issues/5142
  32. matrix:
  33. include:
  34. - env: ['os_image=ubuntu:16.04', gcc_version=5]
  35. services: [docker]
  36. script:
  37. # Travis seems to get confused when `matrix:` is used with `language:`
  38. - sudo apt-get install python2.7
  39. # We don't want to write the script inline because of Travis kludginess --
  40. # it looks like it escapes " and \ in scripts when using `matrix:`.
  41. - ./build/fbcode_builder/travis_docker_build.sh
  42. notifications:
  43. webhooks: https://code.facebook.com/travis/webhook/