config 5.7 KB

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