aboutsummaryrefslogtreecommitdiff
path: root/armnn-ci-build.yaml
blob: aa844a19286cdeb1f0e928e7baf256611b64e850 (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
- job:
    name: armnn-ci-build
    project-type: freestyle
    defaults: global
    description: |
        Updates source and builds ArmNN frequently to ensure builds are successful.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 90
            num-to-keep: 90
        - github:
            url: https://git.mlplatform.org/ml/armnn.git

    triggers:
        - gerrit:
            override-votes: true
            gerrit-build-failed-verified-value: -1
            trigger-on:
                - patchset-created-event:
                    exclude-drafts: true
                    exclude-trivial-rebase: true
                    exclude-no-code-change: true
                - comment-added-contains-event:
                    comment-contains-value: 'TRIGGER BUILD'
            projects:
                - project-compare-type: 'PLAIN'
                  project-pattern: 'ml/armnn'
                  branches:
                    - branch-compare-type: 'PLAIN'
                      branch-pattern: 'master'
            skip-vote:
                    successful: true
                    failed: false
            server-name: review.mlplatform.org

    parameters:
        - string:
            name: LAVA_SERVER
            default: 'https://validation.linaro.org/RPC2/'
        - string:
            name: GIT_COM_ID
    disabled: false
    node: docker-stretch-arm64
    display-name: 'Arm NN - CI Build'

    wrappers:
        - timestamps
        - credentials-binding:
            - text:
                credential-id: QA_REPORTS_TOKEN
                variable: QA_REPORTS_TOKEN
    builders:
        - shell:
            !include-raw: armnn-ci-build/builders.sh
        - shell: |
            #!/bin/bash -e
            echo "DEVICE_TYPE=${DEVICE_TYPE}" > device_type_parameters
        - inject:
            properties-file: device_type_parameters
        - linaro-publish-token
        - shell: |
            #!/bin/bash

            set -ex

            # Publish
            test -d ${HOME}/bin || mkdir ${HOME}/bin
            wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
            time python3 ${HOME}/bin/linaro-cp.py \
              --link-latest \
              out/ components/armnn/${BUILD_NUMBER}
        - shell: |
            #!/bin/bash -ex

            export DEVICE_TYPE=hi960-hikey
            
            if [ -z "$GIT_COM_ID" ]
            then
                LAVA_ID=${GERRIT_CHANGE_NUMBER}_${GERRIT_PATCHSET_NUMBER}
            else
                LAVA_ID=$GIT_COM_ID
            fi

            rm -rf configs
            git clone --depth 1 http://git.linaro.org/ci/job/configs.git

            curl \
                --header "Auth-Token: $QA_REPORTS_TOKEN" \
                --form patch_source=gerrit-ssh-mlplatform \
                --form patch_id=${GERRIT_CHANGE_NUMBER}:${GERRIT_PATCHSET_NUMBER} \
                https://qa-reports.linaro.org/api/createbuild/armnn/armnn/$LAVA_ID

            python configs/armnn-ci-build/submit_for_testing.py \
                --device-type ${DEVICE_TYPE} \
                --build-number ${BUILD_NUMBER} \
                --qa-server-team armnn \
                --qa-server-project armnn \
                --lava-server ${LAVA_SERVER} \
                --git-commit ${LAVA_ID}

            export DEVICE_TYPE=synquacer

            python configs/armnn-ci-build/submit_for_testing.py \
                --device-type ${DEVICE_TYPE} \
                --build-number ${BUILD_NUMBER} \
                --qa-server-team armnn \
                --qa-server-project armnn \
                --lava-server ${LAVA_SERVER} \
                --git-commit ${LAVA_ID}

            export DEVICE_TYPE=dragonboard-845c

            python configs/armnn-ci-build/submit_for_testing.py \
                --device-type ${DEVICE_TYPE} \
                --build-number ${BUILD_NUMBER} \
                --qa-server-team armnn \
                --qa-server-project armnn \
                --lava-server ${LAVA_SERVER} \
                --git-commit ${LAVA_ID}