config 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # vim: filetype=yaml sw=2
  2. version: '[% c("var/webrtc_tag") %]'
  3. filename: 'webrtc-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
  4. var:
  5. container:
  6. use_container: 1
  7. webrtc_tag: c279861207c5b15fc51069e96595782350e0ac12
  8. input_files:
  9. - project: container-image
  10. - project: webrtc
  11. pkg_type: fetch_sources
  12. - project: depot_tools
  13. name: depot_tools
  14. - name: '[% c("var/compiler") %]'
  15. project: '[% c("var/compiler") %]'
  16. - project: binutils
  17. name: binutils
  18. enable: '[% c("var/linux") %]'
  19. - filename: webrtc-linux.patch
  20. enable: '[% c("var/linux") %]'
  21. - filename: webrtc-mac.patch
  22. enable: '[% c("var/osx") %]'
  23. targets:
  24. linux:
  25. var:
  26. webrtc:
  27. os: linux
  28. arch_deps:
  29. - libasound2-dev
  30. - libexpat1-dev
  31. - libglib2.0-dev
  32. - libgtk2.0-dev
  33. - libudev-dev
  34. - libx11-dev
  35. - libxext-dev
  36. - libxrandr-dev
  37. - pkg-config
  38. linux-i686:
  39. var:
  40. webrtc:
  41. lib_path: lib/libwebrtc-linux-386-magic.a
  42. linux-x86_64:
  43. var:
  44. webrtc:
  45. lib_path: lib/libwebrtc-linux-amd64-magic.a
  46. osx-x86_64:
  47. var:
  48. webrtc:
  49. lib_path: lib/libwebrtc-darwin-amd64-magic.a
  50. arch_deps:
  51. - libglib2.0-dev
  52. - libgtk2.0-dev
  53. - pkg-config
  54. - python-biplist
  55. steps:
  56. fetch_sources:
  57. var:
  58. container:
  59. use_container: 0
  60. filename: 'webrtc-sources-[% c("var/webrtc_tag") %].tar.gz'
  61. fetch_sources: |
  62. #!/bin/bash
  63. [% c("var/set_default_env") -%]
  64. # WebRTC is special, having its own build system that brings in lots of Chromium dependencies.
  65. # https://webrtc.org/native-code/development/
  66. tar xf [% c('input_files_by_name/depot_tools') %]
  67. export PATH="$rootdir/depot_tools:$PATH"
  68. # Use --no-history because the whole checkout with history is about 12 GB.
  69. # JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
  70. # default-java comes from the package default-jdk-headless.
  71. export JAVA_HOME=/usr/lib/jvm/default-java
  72. clone_dir='[% c("basedir") %]/gclient/webrtc'
  73. mkdir -p "$clone_dir"
  74. cd "$clone_dir"
  75. if [ ! -d "src" ];
  76. then
  77. # "fetch" is part of depot_tools.
  78. #fetch --nohooks --no-history webrtc
  79. # FIXME: To avoid the unconditional `gclient sync` in the call to fetch,
  80. # we inline the result of a `fetch --dry-run`
  81. gclient root
  82. gclient config --spec 'solutions = [
  83. {
  84. "managed": False,
  85. "name": "src",
  86. "url": "https://chromium.googlesource.com/external/webrtc.git",
  87. "custom_deps": {},
  88. "deps_file": "DEPS",
  89. "safesync_url": "",
  90. },
  91. ]
  92. '
  93. gclient sync --nohooks --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
  94. cd src
  95. git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
  96. git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
  97. git config diff.ignoreSubmodules all
  98. cd ..
  99. fi
  100. # "gclient" is part of depot_tools. This download takes a long time the first time.
  101. gclient sync --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
  102. cd ..
  103. tar --exclude .git -czf [% dest_dir _ '/' _ c('filename') %] webrtc
  104. input_files:
  105. - project: depot_tools
  106. name: depot_tools
  107. pkg_type: build