config 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. # vim: filetype=yaml sw=2
  2. version: '[% c("abbrev") %]'
  3. filename: 'geckoview-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
  4. git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/torbrowser_branch") %]-1-build1'
  5. tag_gpg_id: 1
  6. git_url: https://git.torproject.org/tor-browser.git
  7. git_submodule: 1
  8. gpg_keyring: torbutton.gpg
  9. var:
  10. geckoview_version: 92.0
  11. torbrowser_branch: 11.0
  12. copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
  13. deps:
  14. - build-essential
  15. - unzip
  16. - zip
  17. - autoconf2.13
  18. - yasm
  19. # We are building our own version of Python 3.6, which is required
  20. # for the build. However mach still requires Python 2.7, so we
  21. # install this version using the package.
  22. - python
  23. - pkg-config
  24. container:
  25. use_container: 1
  26. # this should be updated when the list of gradle dependencies is changed
  27. gradle_dependencies_version: 6
  28. gradle_version: 5.1.1
  29. steps:
  30. merge_aars:
  31. filename: 'geckoview-[% c("version") %]-[% c("var/build_id") %].tar.gz'
  32. version: '[% c("abbrev") %]'
  33. merge_aars: |
  34. #!/bin/bash
  35. [% c("var/set_default_env") -%]
  36. [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
  37. distdir=/var/tmp/dist
  38. builddir=/var/tmp/build
  39. mkdir -p /var/tmp/build
  40. mkdir -p $distdir/[% project %]
  41. tar -C $GRADLE_HOME -xf $rootdir/[% c('input_files_by_name/gradle') %]
  42. cat > get-moz-build-date << "EOF"
  43. [% INCLUDE "get-moz-build-date" %]
  44. EOF
  45. tar -C $distdir -xf [% c('input_files_by_name/node') %]
  46. tar -C $distdir -xf [% c('input_files_by_name/python') %]
  47. export PATH="/var/tmp/dist/node/bin:/var/tmp/dist/python/bin:$PATH"
  48. tar -C $builddir -xf [% c('input_files_by_name/geckoview_armv7') %]
  49. tar -C $builddir -xf [% c('input_files_by_name/geckoview_aarch64') %]
  50. tar -C $builddir -xf [% c('input_files_by_name/geckoview_x86') %]
  51. tar -C $builddir -xf [% c('input_files_by_name/geckoview_x86_64') %]
  52. tar -C $builddir -xf [% project %]-[% c('version') %].tar.gz
  53. # Specify the architectures we want to merge
  54. export MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
  55. export MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=$builddir/geckoview/*armeabi-v7a*.aar
  56. export MOZ_ANDROID_FAT_AAR_ARM64_V8A=$builddir/geckoview/*arm64-v8a*.aar
  57. # Specifying just "x86" is not differentiating enough
  58. export MOZ_ANDROID_FAT_AAR_X86=$builddir/geckoview/*x86-*.aar
  59. export MOZ_ANDROID_FAT_AAR_X86_64=$builddir/geckoview/*x86_64*.aar
  60. cd $builddir/[% project %]-[% c("version") %]
  61. mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig
  62. eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %])
  63. if [ -z $MOZ_BUILD_DATE ]
  64. then
  65. echo "MOZ_BUILD_DATE is not set"
  66. exit 1
  67. fi
  68. export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
  69. gradle_repo=/var/tmp/dist/gradle-dependencies
  70. export GRADLE_MAVEN_REPOSITORIES="file://$gradle_repo"
  71. export GRADLE_FLAGS="--no-daemon --offline"
  72. mv $rootdir/[% c('input_files_by_name/gradle-dependencies') %] $gradle_repo
  73. cp -r $gradle_repo/m2/* $gradle_repo
  74. # We unbreak mach, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1656993.
  75. export MACH_USE_SYSTEM_PYTHON=1
  76. # We still need to specify --tor-browser-version due to bug 34005.
  77. ./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %]
  78. ./mach build --verbose
  79. find obj-* -regex '.*geckoview.*[0-9].\(aar\|pom\)' -exec cp {} $distdir/[% project %] \;
  80. cd $distdir/
  81. [% c('tar', {
  82. tar_src => [ project ],
  83. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  84. }) %]
  85. input_files:
  86. - project: container-image
  87. pkg_type: build
  88. - name: '[% c("var/compiler") %]'
  89. project: '[% c("var/compiler") %]'
  90. pkg_type: build
  91. - project: gradle
  92. name: gradle
  93. pkg_type: build
  94. - project: node
  95. name: node
  96. pkg_type: build
  97. - project: python
  98. name: python
  99. pkg_type: build
  100. - filename: mozconfig-android-all
  101. name: mozconfig
  102. - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
  103. name: gradle-dependencies
  104. exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
  105. - name: geckoview_armv7
  106. project: geckoview
  107. pkg_type: build
  108. target_prepend:
  109. - torbrowser-android-armv7
  110. - name: geckoview_aarch64
  111. project: geckoview
  112. pkg_type: build
  113. target_prepend:
  114. - torbrowser-android-aarch64
  115. - name: geckoview_x86
  116. project: geckoview
  117. pkg_type: build
  118. target_prepend:
  119. - torbrowser-android-x86
  120. - name: geckoview_x86_64
  121. project: geckoview
  122. pkg_type: build
  123. target_prepend:
  124. - torbrowser-android-x86_64
  125. list_toolchain_updates:
  126. git_url: https://github.com/mozilla/gecko-dev.git
  127. # beta
  128. git_hash: beta
  129. tag_gpg_id: 0
  130. input_files: []
  131. var:
  132. container:
  133. use_container: 0
  134. targets:
  135. nightly:
  136. git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/torbrowser_branch") %]-1'
  137. tag_gpg_id: 0
  138. input_files:
  139. - project: container-image
  140. - name: '[% c("var/compiler") %]'
  141. project: '[% c("var/compiler") %]'
  142. - project: gradle
  143. name: gradle
  144. - filename: 'mozconfig-[% c("var/osname") %]'
  145. name: mozconfig
  146. - project: binutils
  147. name: binutils
  148. - project: rust
  149. name: rust
  150. - project: cbindgen
  151. name: cbindgen
  152. - project: node
  153. name: node
  154. - project: nasm
  155. name: nasm
  156. - project: python
  157. name: python
  158. - project: clang
  159. name: clang
  160. - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
  161. name: gradle-dependencies
  162. exec: '[% INCLUDE "fetch-gradle-dependencies" %]'