config 5.8 KB

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