config 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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: 88f5d9180eae78a6162cccd78850ff416eb82483
  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. linux-i686:
  29. var:
  30. webrtc:
  31. lib_path: lib/libwebrtc-linux-386-magic.a
  32. sort_deps: 0
  33. arch_deps:
  34. - lib32asound2-dev
  35. - lib64expat1
  36. - libexpat1-dev:i386
  37. - libglib2.0-dev:i386
  38. - libgtk2.0-dev:i386
  39. - libgtk-3-dev:i386
  40. - libudev-dev:i386
  41. - libx11-dev:i386
  42. - libxext-dev:i386
  43. - libxrandr-dev:i386
  44. - pkg-config
  45. - hardening-wrapper
  46. linux-x86_64:
  47. var:
  48. webrtc:
  49. lib_path: lib/libwebrtc-linux-amd64-magic.a
  50. arch_deps:
  51. - libasound2-dev
  52. - libexpat1-dev
  53. - libglib2.0-dev
  54. - libgtk2.0-dev
  55. - libgtk-3-dev
  56. - libudev-dev
  57. - libx11-dev
  58. - libxext-dev
  59. - libxrandr-dev
  60. - pkg-config
  61. osx-x86_64:
  62. var:
  63. webrtc:
  64. lib_path: lib/libwebrtc-darwin-amd64-magic.a
  65. arch_deps:
  66. - libglib2.0-dev
  67. - libgtk2.0-dev
  68. - pkg-config
  69. - python-biplist
  70. steps:
  71. fetch_sources:
  72. var:
  73. container:
  74. use_container: 0
  75. filename: 'webrtc-sources-[% c("var/webrtc_tag") %].tar.gz'
  76. fetch_sources: |
  77. #!/bin/bash
  78. [% c("var/set_default_env") -%]
  79. # WebRTC is special, having its own build system that brings in lots of Chromium dependencies.
  80. # https://webrtc.org/native-code/development/
  81. tar xf [% c('input_files_by_name/depot_tools') %]
  82. export PATH="$rootdir/depot_tools:$PATH"
  83. # Use --no-history because the whole checkout with history is about 12 GB.
  84. # JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
  85. # default-java comes from the package default-jdk-headless.
  86. export JAVA_HOME=/usr/lib/jvm/default-java
  87. clone_dir='[% c("basedir") %]/gclient/webrtc'
  88. mkdir -p "$clone_dir"
  89. cd "$clone_dir"
  90. if [ ! -d "src" ];
  91. then
  92. # "fetch" is part of depot_tools.
  93. #fetch --nohooks --no-history webrtc
  94. # FIXME: To avoid the unconditional `gclient sync` in the call to fetch,
  95. # we inline the result of a `fetch --dry-run`
  96. gclient root
  97. gclient config --spec 'solutions = [
  98. {
  99. "managed": False,
  100. "name": "src",
  101. "url": "https://chromium.googlesource.com/external/webrtc.git",
  102. "custom_deps": {},
  103. "deps_file": "DEPS",
  104. "safesync_url": "",
  105. },
  106. ]
  107. '
  108. gclient sync --nohooks --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
  109. cd src
  110. git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
  111. git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
  112. git config diff.ignoreSubmodules all
  113. cd ..
  114. fi
  115. # "gclient" is part of depot_tools. This download takes a long time the first time.
  116. gclient sync --force --delete_unversioned_trees --reset --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
  117. cd ..
  118. tar --exclude .git -czf [% dest_dir _ '/' _ c('filename') %] webrtc
  119. input_files:
  120. - project: depot_tools
  121. name: depot_tools
  122. pkg_type: build