aboutsummaryrefslogtreecommitdiff
path: root/tcwg-benchmark-christophe.yaml
blob: 9aa824417c33c1cdd57a670269c750e9ce692564 (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
- job:
    name: tcwg-benchmark-christophe
    project-type: matrix
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 100
    parameters:
        - string:
            name: toolchain_url
            default: ''
            description: 'Toolchain URL'
        - string:
           name: bench_list
           default: 'bzip2'
           description: 'List of benchmarks to run (from spec2k6)'
        - string:
            name: config
            default: 'myconfig'
            description: 'config name'
        - string:
            name: cflags
            default: ''
            description: 'CFLAGS to use'
        - string:
            name: fileserver
            default: dev-01.tcwglab
            description: 'File Server for results'
    disabled: false
    node: tcwg-x86_64-build
    child-workspace: $label
    concurrent: true
    display-name: 'TCWG ZZZ Benchmark Christophe'
    axes:
        - axis:
            type: slave
            name: label
            values:
                - tcwg-bmk-tx1-06
                - tcwg-bmk-tx1-07
                - tcwg-bmk-tx1-08
    execution-strategy:
        sequential: false
    wrappers:
        - timeout:
            timeout: 600
        - timestamps
        - ssh-agent-credentials:
            users:
                - 'tcwg-benchmark'
        - workspace-cleanup:
            include:
              - "*"
            dirmatch: true
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            ssh-add -l
            wget --progress=dot:giga --no-check-certificate ${toolchain_url}
            tarball=$(basename ${toolchain_url})
            tar xf ${tarball}
            toolchaindir=$(echo ${tarball} | sed 's/.tar.xz//')

            # Slaves for this job are virtual slaves on dev-01,
            # convert the slave name into the target board name
            boardname=$(echo ${NODE_NAME} | sed 's/-bmk//').tcwglab
            boardname="tcwg-benchmark@${boardname}"
            ssh_opts="-o StrictHostKeyChecking=no -Snone"
            ssh ${ssh_opts} $boardname rm -rf bmk-scripts
            ssh ${ssh_opts} $boardname git clone https://git-us.linaro.org/toolchain/bmk-scripts

            case ${label} in
                *-tx1-*) target=aarch64-linux-gnu- ;;
                *-tk1-*) target=arm-linux-gnueabihf- ;;
                *)
                    echo "ERROR: Unsupported label: ${label}"
                    exit 1
                    ;;
            esac

            # Hack: populate tcwg-benchmark's known_hosts on the board
            ssh -A ${ssh_opts} $boardname ssh ${ssh_opts} git@dev-private-git.linaro.org true || true
            ssh -A ${ssh_opts} $boardname ssh ${ssh_opts} dev-01.tcwglab true || true
            
            # FIXME: bench_list can contain more than one bench
            # FIXME: support cflags
            ssh -t -A ${ssh_opts} $boardname bash -x bmk-scripts/run.sh \
                --bench ${bench_list} \
                --config ${config} \
                --nosudo \
                --ccprefix dev-01.tcwglab:${WORKSPACE}/${toolchaindir}/bin/${target} \
                --toolchain gnu \
                --logserver ${fileserver} \
                --nodename ${NODE_NAME}

            exit 0