config 3.8 KB

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