config 5.53 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: 'geckoview-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/torbrowser_branch") %]-1-build2'
tag_gpg_id: 1
git_url: https://git.torproject.org/tor-browser.git
git_submodule: 1
gpg_keyring: torbutton.gpg

var:
11
12
13
  geckoview_version: '80.0b[% c("var/beta_version") %]'
  beta_version: 2
  torbrowser_branch: 10.0
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
  deps:
    - build-essential
    - unzip
    - zip
    - autoconf2.13
    - yasm
    # We are building our own version of Python 3.6, which is required
    # for the build. However mach still requires Python 2.7, so we
    # install this version using the package.
    - python
    - pkg-config
  container:
    use_container: 1
  # this should be updated when the list of gradle dependencies is changed
29
  gradle_dependencies_version: 2
30

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
steps:
  merge_aars:
    filename: 'geckoview-[% c("version") %]-[% c("var/build_id") %].tar.gz'
    version: '[% c("abbrev") %]'
    merge_aars: |
      #!/bin/bash
      [% c("var/set_default_env") -%]
      [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
      distdir=/var/tmp/dist
      builddir=/var/tmp/build
      mkdir -p /var/tmp/build
      mkdir -p $distdir/[% project %]

      cat > get-moz-build-date << "EOF"
      [% INCLUDE "get-moz-build-date" %]
      EOF

      tar -C $distdir -xf [% c('input_files_by_name/node') %]
      tar -C $distdir -xf [% c('input_files_by_name/python') %]
50
      export PATH="/var/tmp/dist/node/bin:/var/tmp/dist/python/bin:$PATH"
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

      tar -C $builddir -xf [% c('input_files_by_name/geckoview_armv7') %]
      tar -C $builddir -xf [% c('input_files_by_name/geckoview_aarch64') %]
      tar -C $builddir -xf [% c('input_files_by_name/geckoview_x86') %]
      tar -C $builddir -xf [% c('input_files_by_name/geckoview_x86_64') %]
      tar -C $builddir -xf [% project %]-[% c('version') %].tar.gz

      # Specify the architectures we want to merge
      export MOZ_ANDROID_FAT_AAR_ARCHITECTURES=armeabi-v7a,arm64-v8a,x86,x86_64
      export MOZ_ANDROID_FAT_AAR_ARMEABI_V7A=$builddir/geckoview/*armeabi-v7a*.aar
      export MOZ_ANDROID_FAT_AAR_ARM64_V8A=$builddir/geckoview/*arm64-v8a*.aar
      # Specifying just "x86" is not differentiating enough
      export MOZ_ANDROID_FAT_AAR_X86=$builddir/geckoview/*x86-*.aar
      export MOZ_ANDROID_FAT_AAR_X86_64=$builddir/geckoview/*x86_64*.aar

      cd $builddir/[% project %]-[% c("version") %]
      mv -f $rootdir/[% c('input_files_by_name/mozconfig') %] .mozconfig

      eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %])
      if [ -z $MOZ_BUILD_DATE ]
      then
          echo "MOZ_BUILD_DATE is not set"
          exit 1
      fi

      gradle_repo=/var/tmp/dist/gradle-dependencies
      export GRADLE_MAVEN_REPOSITORIES="file://$gradle_repo"
      export GRADLE_FLAGS="--no-daemon --offline"
      mv $rootdir/[% c('input_files_by_name/gradle-dependencies') %] $gradle_repo
      cp -r $gradle_repo/m2/* $gradle_repo

82
83
      # We unbreak mach, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1656993.
      export MACH_USE_SYSTEM_PYTHON=1
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
      # We still need to specify --tor-browser-version due to bug 34005.
      ./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %]
      ./mach build --verbose
      find obj-* -regex '.*geckoview.*[0-9].\(aar\|pom\)' -exec cp {} $distdir/[% project %] \;

      cd $distdir/
      [% c('tar', {
              tar_src => [ project ],
              tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
         }) %]


    input_files:
      - project: container-image
        pkg_type: build
      - name: '[% c("var/compiler") %]'
        project: '[% c("var/compiler") %]'
        pkg_type: build
102
      - project: node
103
104
105
106
107
108
109
110
111
112
113
114
115
116
        name: node
        pkg_type: build
      - project: python
        name: python
        pkg_type: build
      - filename: mozconfig-android-all
        name: mozconfig
      - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
        name: gradle-dependencies
        exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
      - name: geckoview_armv7
        project: geckoview
        pkg_type: build
        target_prepend:
Georg Koppen's avatar
Georg Koppen committed
117
          - torbrowser-android-armv7
118
119
120
121
      - name: geckoview_aarch64
        project: geckoview
        pkg_type: build
        target_prepend:
Georg Koppen's avatar
Georg Koppen committed
122
          - torbrowser-android-aarch64
123
124
125
126
      - name: geckoview_x86
        project: geckoview
        pkg_type: build
        target_prepend:
Georg Koppen's avatar
Georg Koppen committed
127
          - torbrowser-android-x86
128
129
130
131
      - name: geckoview_x86_64
        project: geckoview
        pkg_type: build
        target_prepend:
Georg Koppen's avatar
Georg Koppen committed
132
          - torbrowser-android-x86_64
133
134


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
targets:
  nightly:
    git_hash: 'tor-browser-[% c("var/geckoview_version") %]-[% c("var/torbrowser_branch") %]-1'
    tag_gpg_id: 0

input_files:
  - project: container-image
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - filename: 'mozconfig-[% c("var/osname") %]'
    name: mozconfig
  - project: binutils
    name: binutils
  - project: fenix-rust
    name: rust
  - project: fenix-cbindgen
    name: cbindgen
152
  - project: node
153
154
155
156
157
158
159
160
161
162
    name: node
  - project: nasm
    name: nasm
  - project: python
    name: python
  - project: fenix-clang
    name: clang
  - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
    name: gradle-dependencies
    exec: '[% INCLUDE "fetch-gradle-dependencies" %]'