config 3.24 KB
Newer Older
boklm's avatar
boklm committed
1
2
3
4
5
# vim: filetype=yaml sw=2
version: '[% c("var/webrtc_tag") %]'
filename: 'webrtc-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'

var:
boklm's avatar
boklm committed
6
7
  container:
    use_container: 1
boklm's avatar
boklm committed
8
  webrtc_tag: c279861207c5b15fc51069e96595782350e0ac12
boklm's avatar
boklm committed
9
10

input_files:
boklm's avatar
boklm committed
11
  - project: container-image
boklm's avatar
boklm committed
12
13
14
15
16
17
18
19
20
  - project: webrtc
    pkg_type: fetch_sources
  - project: depot_tools
    name: depot_tools
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - project: binutils
    name: binutils
    enable: '[% c("var/linux") %]'
boklm's avatar
boklm committed
21
22
  - filename: webrtc-linux.patch
    enable: '[% c("var/linux") %]'
boklm's avatar
boklm committed
23
24
25
26
27
28
29
30
31

targets:
  linux:
    var:
      webrtc:
        os: linux
      arch_deps:
        - libasound2-dev
        - libexpat1-dev
boklm's avatar
boklm committed
32
33
        - libglib2.0-dev
        - libgtk2.0-dev
boklm's avatar
boklm committed
34
35
36
37
        - libudev-dev
        - libx11-dev
        - libxext-dev
        - libxrandr-dev
boklm's avatar
boklm committed
38
        - pkg-config
39
40
41
42
43
44
45
46
  linux-i686:
    var:
      webrtc:
        arch: ia32
        lib_arch: 386
        lib_path: lib/libwebrtc-linux-386-magic.a
  linux-x86_64:
    var:
boklm's avatar
boklm committed
47
48
49
50
51
52
53
      webrtc:
        arch: x64
        lib_arch: amd64
        lib_path: lib/libwebrtc-linux-amd64-magic.a

steps:
  fetch_sources:
boklm's avatar
boklm committed
54
55
56
    var:
      container:
        use_container: 0
boklm's avatar
boklm committed
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
    filename: 'webrtc-sources-[% c("var/webrtc_tag") %].tar.gz'
    fetch_sources: |
      #!/bin/bash
      [% c("var/set_default_env") -%]
      # WebRTC is special, having its own build system that brings in lots of Chromium dependencies.
      # https://webrtc.org/native-code/development/
      tar xf [% c('input_files_by_name/depot_tools') %]
      export PATH="$rootdir/depot_tools:$PATH"
      # Use --no-history because the whole checkout with history is about 12 GB.
      # JAVA_HOME is needed in a hook for libjingle. The readlink line tries to find the current JRE.
      # default-java comes from the package default-jdk-headless.
      export JAVA_HOME=/usr/lib/jvm/default-java
      clone_dir='[% c("basedir") %]/gclient/webrtc'
      mkdir -p "$clone_dir"
      cd "$clone_dir"
      if [ ! -d "src" ];
      then
        # "fetch" is part of depot_tools.
        #fetch --nohooks --no-history webrtc
        # FIXME: To avoid the unconditional `gclient sync` in the call to fetch,
        # we inline the result of a `fetch --dry-run`
        gclient root
        gclient config --spec 'solutions = [
          {
            "managed": False,
            "name": "src",
            "url": "https://chromium.googlesource.com/external/webrtc.git",
            "custom_deps": {},
            "deps_file": "DEPS",
            "safesync_url": "",
          },
        ]
        '
        gclient sync --nohooks --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
        cd src
        git submodule foreach 'git config -f $toplevel/.git/config submodule.$name.ignore all'
        git config --add remote.origin.fetch '+refs/tags/*:refs/tags/*'
        git config diff.ignoreSubmodules all
        cd ..
      fi
      # "gclient" is part of depot_tools. This download takes a long time the first time.
      gclient sync --no-history --with_branch_heads -r [% c("var/webrtc_tag") %]
      cd ..
      tar --exclude .git -czf [% dest_dir _ '/' _ c('filename') %] webrtc
    input_files:
      - project: depot_tools
        name: depot_tools
        pkg_type: build