aboutsummaryrefslogtreecommitdiffstats
path: root/coin/module_config.yaml
blob: 3f7f7976094274c60f29f36c2b80c805dce9ee53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: 2
accept_configuration:
  condition: and
  conditions:
    - condition: property
      property: host.compiler
      equals_value: Yocto
    - condition: property
      property: target.arch
      in_values: [TARGET1, TARGET2, TARGET3, TARGET4]

machine_type:
  Build:
    cores: 16

# Target build matrix:
#
#           [target1]   [target2]   [target3]   [target4]   [target5]
# [machine] qemuarm64   qemux86     qemuarm     qemux86-64  qemuarm64
# [yocto]   gatesgarth  dunfell     hardknott   honister    master
#

target1: &target1
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemuarm64
    - type: EnvironmentVariable
      variableName: MANIFEST
      variableValue: gatesgarth.xml
    - type: EnvironmentVariable
      variableName: TEST_CONFIGS
      variableValue: ci configs
  enable_if:
      condition: property
      property: target.arch
      equals_value: TARGET1
target2: &target2
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemux86
    - type: EnvironmentVariable
      variableName: MANIFEST
      variableValue: dunfell.xml
    - type: EnvironmentVariable
      variableName: TEST_CONFIGS
      variableValue: ci configs
  enable_if:
      condition: property
      property: target.arch
      equals_value: TARGET2
target3: &target3
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemuarm
    - type: EnvironmentVariable
      variableName: MANIFEST
      variableValue: hardknott.xml
    - type: EnvironmentVariable
      variableName: TEST_CONFIGS
      variableValue: ci configs
  enable_if:
      condition: property
      property: target.arch
      equals_value: TARGET3
target4: &target4
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemux86-64
    - type: EnvironmentVariable
      variableName: MANIFEST
      variableValue: honister.xml
    - type: EnvironmentVariable
      variableName: TEST_CONFIGS
      variableValue: ci configs
  enable_if:
      condition: property
      property: target.arch
      equals_value: TARGET4
target5: &target5
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemuarm64
    - type: EnvironmentVariable
      variableName: MANIFEST
      variableValue: master.xml
    - type: EnvironmentVariable
      variableName: TEST_CONFIGS
      variableValue: ci configs
  enable_if:
      condition: property
      property: target.arch
      equals_value: TARGET5

instructions:
  Build:
  - *target1
  - *target2
  - *target3
  - *target4
  - *target5
  - type: EnvironmentVariable
    variableName: DL_DIR
    variableValue: "/mnt/yocto-cache/downloads"
  - type: EnvironmentVariable
    variableName: SOURCE_DIR
    variableValue: "{{.SourceDir}}"
  - type: SetBuildDirectory
    directory: "{{.AgentWorkingDir}}/build"
  - type: MakeDirectory
    directory: "{{.BuildDir}}"
  - type: ChangeDirectory
    directory: "{{.BuildDir}}"
  - type: WriteFile
    fileContents: |
      #!/bin/bash -xe

      # make hostname unique for NFS
      sudo hostname $(hostname -s)-$(date +%s%N)

      sudo mkdir -p /mnt/yocto-cache
      sudo mount yocto-cache.ci.qt.io:/srv/yocto-cache /mnt/yocto-cache

      curl https://storage.googleapis.com/git-repo-downloads/repo > repo
      chmod +x repo

      ./repo init \
          -u git://code.qt.io/yocto/boot2qt-manifest \
          -b ci \
          -m ${MANIFEST} \
          --reference /mnt/mirror
      ./repo sync

      source ./poky/oe-init-build-env
      bitbake-layers add-layer ../meta-openembedded/meta-oe
      bitbake-layers add-layer ../meta-python2
      bitbake-layers add-layer ${SOURCE_DIR}

      for conf in ${TEST_CONFIGS}; do
         echo "require ${SOURCE_DIR}/coin/test-${conf}.inc" >> conf/local.conf
      done

      # EXCLUDE_FROM_WORLD
      rm -fv ${SOURCE_DIR}/recipes-qt/examples/qt5-opengles2-test_git.bb
      rm -rv ${SOURCE_DIR}/recipes-python/pyqtchart/python3-pyqtchart_*.bb
      rm -rv ${SOURCE_DIR}/recipes-python/pytest-qt/python3-pytest-qt_*.bb

      # build all recipes found in the layer
      bitbake $(find ${SOURCE_DIR} -name *.bb | xargs -n1 basename | sed -e 's/\([^._]*\).*/\1/')
    filename: "{{.BuildDir}}/start-build"
    fileMode: 420
  - type: ExecuteCommand
    command: ["bash", "-xe", "{{.BuildDir}}/start-build"]
    maxTimeInSeconds: 39600
    maxTimeBetweenOutput: 39600
    userMessageOnFailure: "Build failed."
  - type: ExecuteCommand
    command: ["sudo", "umount", "/mnt/yocto-cache"]
    userMessageOnFailure: "Unmounting cache failed."

  Test: []