aboutsummaryrefslogtreecommitdiffstats
path: root/coin/module_config.yaml
blob: 7af8e30a7f603963797e2644785ac7c0c16db749 (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
version: 1
accept_configuration:
  condition: and
  conditions:
    - condition: property
      property: host.osVersion
      equals_value: Ubuntu_18_04
    - condition: property
      property: target.osVersion
      equals_value: QEMU
    - condition: property
      property: target.arch
      in_values: [ARMv7, ARM64]

environment: &environment
  type: Group
  instructions:
    - type: EnvironmentVariable
      variableName: POKY_SHA1
      variableValue: febbe2944c0c4a04b85fa98fdc261186115954d8
    - type: EnvironmentVariable
      variableName: OE_SHA1
      variableValue: 8a72d29e0876830ffd96b85d7d0308302eb07a5d
    - type: EnvironmentVariable
      variableName: PYTHON2_SHA1
      variableValue: e2ef0dd8fa13d6b96e44773b09d07e4817d0a44d
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemuarm64
      enable_if:
        condition: property
        property: target.arch
        equals_value: ARM64
    - type: EnvironmentVariable
      variableName: MACHINE
      variableValue: qemux86
      enable_if:
        condition: property
        property: target.arch
        equals_value: ARMv7

build_instructions:
  - *environment
  - type: SetBuildDirectory
    directory: "{{.AgentWorkingDir}}/build"
  - type: MakeDirectory
    directory: "{{.BuildDir}}"
  - type: ChangeDirectory
    directory: "{{.BuildDir}}"
  - type: ExecuteCommand
    command: ["sudo", "mkdir", "-p", "/mnt/yocto-cache"]
    userMessageOnFailure: "Could not create '/mnt/yocto-cache' directory"
  - type: ExecuteCommand
    command: ["sudo", "mount", "yocto-cache.intra.qt.io:/srv/yocto-cache", "/mnt/yocto-cache"]
    userMessageOnFailure: "Could not mount yocto cache."
  - type: WriteFile
    fileContents: |
      #!/bin/bash -xe
      git clone git://git.yoctoproject.org/poky --reference /mnt/yocto-cache/mirror/poky.git
      (cd poky; git checkout ${POKY_SHA1})
      git clone git://github.com/openembedded/meta-openembedded --reference /mnt/yocto-cache/mirror/meta-openembedded.git
      (cd meta-openembedded; git checkout ${OE_SHA1})
      git clone git://git.openembedded.org/meta-python2 --reference /mnt/yocto-cache/mirror/meta-python2.git
      (cd meta-python2; git checkout ${PYTHON2_SHA1})

      source ./poky/oe-init-build-env
      export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE SSTATE_DIR DL_DIR"
      export DL_DIR=/mnt/yocto-cache/downloads
      export BB_GENERATE_MIRROR_TARBALLS=1
      export SSTATE_DIR=/mnt/yocto-cache/sstate-caches/$(sed -n -e "s/DISTRO_CODENAME.*\"\(.*\)\"/\1/p" ../poky/meta-*/conf/distro/poky.conf)
      bitbake-layers add-layer ../meta-openembedded/meta-oe
      bitbake-layers add-layer ../meta-python2
      bitbake-layers add-layer ${SOURCE_DIR}

      echo "require ${SOURCE_DIR}/coin/test-configs.inc" >> conf/local.conf

      # EXCLUDE_FROM_WORLD
      rm -f ${SOURCE_DIR}/recipes-qt/examples/qt5-opengles2-test_git.bb
      rm -r ${SOURCE_DIR}/recipes-python/pyqt5/python3-pyqt5_5.15.1.bb
      rm -r ${SOURCE_DIR}/recipes-python/pyqtchart/python3-pyqtchart_5.15.1.bb
      bitbake $(find ${SOURCE_DIR} -name *.bb | xargs -n1 basename | sed -e 's/\([^._]*\).*/\1/')
    filename: "{{.BuildDir}}/start-build"
    fileMode: 420
  - type: ExecuteCommand
    command: ["chmod", "+x", "{{.BuildDir}}/start-build"]
    userMessageOnFailure: "Could not add execution right to the start-build."
  - type: EnvironmentVariable
    variableName: DL_DIR
    variableValue: "/mnt/yocto-cache/downloads"
  - type: EnvironmentVariable
    variableName: SOURCE_DIR
    variableValue: "{{.SourceDir}}"
  - type: ExecuteCommand
    command: ["{{.BuildDir}}/start-build"]
    maxTimeInSeconds: 28800
    maxTimeBetweenOutput: 28800
    userMessageOnFailure: "Build failed."
  - type: ExecuteCommand
    command: ["sudo", "umount", "/mnt/yocto-cache"]
    userMessageOnFailure: "Unmounting cache failed."

test_instructions: []