From 369f177ecb8a709ecd5b13d5405b60f56271d9c3 Mon Sep 17 00:00:00 2001 From: Christophe Lyon Date: Wed, 12 Aug 2015 11:17:24 +0200 Subject: tcwg-buildfarm-master-hetzner: New job, copy of tcwg-buildfarm-master but using Hetzner machines only (tcwg-x86_64 label). The purpose of this job is to be able to check validation stability using Hetzner machines only. Change-Id: Ib30306a7f29b44ca708627d2459e61353f6a04be --- tcwg-buildfarm-master-hetzner.yaml | 180 +++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 tcwg-buildfarm-master-hetzner.yaml (limited to 'tcwg-buildfarm-master-hetzner.yaml') diff --git a/tcwg-buildfarm-master-hetzner.yaml b/tcwg-buildfarm-master-hetzner.yaml new file mode 100644 index 0000000000..6554146185 --- /dev/null +++ b/tcwg-buildfarm-master-hetzner.yaml @@ -0,0 +1,180 @@ +- job: + name: tcwg-buildfarm-master-hetzner + project-type: matrix + defaults: global + logrotate: + daysToKeep: 30 + numToKeep: 30 + properties: + - authorization: + anonymous: + - job-read + - job-extended-read + linaro: + - job-build + - job-cancel + parameters: + - string: + name: gcc_branch + default: 'latest' + description: 'GCC revision to build' + - string: + name: host_x86_64_languages + default: 'default' + description: 'Languages to build for x86_64-hosted toolchains, e.g., "c,c++" or "all" or "default"' + - string: + name: host_aarchXX_languages + default: 'c,c++' + description: 'Languages to build for AArchXX-hosted toolchains, e.g., "c,c++" or "all" or "default"' + - string: + name: runtests + default: 'x86_64-host' + description: 'Run toolchain testsuites: "yes", "no", "x86_64-host"' + - bool: + name: try_bootstrap + default: 'true' + description: 'Attempt to bootstrap GCC for compatible host and target combinations' + - string: + name: excludecheck + default: 'gdb' + description: 'Do not run "make check" on this component' + - bool: + name: rebuild + default: true + description: 'Rebuild the toolchain even if results are already on logserver' + - string: + name: log_name + default: '' + description: 'Logname directory on logserver; leave empty for default' + - bool: + name: dont_fail + default: false + description: 'Do not fail the build' + - string: + name: log_server + default: ex40-01.tcwglab.linaro.org:logs-master + description: 'Log_Server' + - string: + name: abe_branch + default: refs/heads/master + description: 'ABE revision to test' + disabled: false + node: tcwg-x86_64 + concurrent: true + display-name: 'TCWG BuildFarm master on Hetzner machines' + scm: + - git: + url: https://git.linaro.org/toolchain/abe.git + refspec: +refs/changes/*:refs/remotes/changes/* + branches: + - ${abe_branch} + skip-tag: true + shallow-clone: true + wipe-workspace: true + axes: + - axis: + type: slave + name: label + values: + - tcwg-x86_64 + - tcwg-aarch64-build + - axis: + type: user-defined + name: target + values: + - aarch64-linux-gnu + - aarch64-none-elf + - aarch64_be-none-elf + - arm-linux-gnueabi + - arm-linux-gnueabihf + - armeb-linux-gnueabihf + - native + - schroot-i386-native + - schroot-armhf-native + execution-strategy: + combination-filter: | + (label=="tcwg-x86_64" && target!="schroot-armhf-native") || (label=="tcwg-aarch64-build" && (target=="native" || target=="schroot-armhf-native")) + sequential: false + wrappers: + - timeout: + timeout: 600 + - timestamps + - ssh-agent-credentials: + # tcwg-buildslave user id + user: 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' + - build-name: + name: '#${BUILD_NUMBER}-${ENV,var="gcc_branch"}' + - matrix-tie-parent: + node: tcwg-x86_64 + builders: + - shell: | + #!/bin/bash + + set -e + set -x + + case ${target} in + schroot-*) + schroot_arch=$(echo ${target} | sed -e "s/^schroot-\([^-]*\)-\(.*\)/\1/") + target=$(echo ${target} | sed -e "s/^schroot-\([^-]*\)-\(.*\)/\2/") + ;; + *) + case $(uname -m) in + x86_64) schroot_arch="amd64" ;; + aarch64) schroot_arch="arm64" ;; + *) echo "Unexpected architecture $(uname -m)"; exit 1 ;; + esac + ;; + esac + schroot_image="tcwg-build-${schroot_arch}-trusty" + + case $(uname -m) in + x86_64) languages="$host_x86_64_languages" ;; + *) languages="$host_aarchXX_languages" ;; + esac + + case "$runtests-$(uname -m)" in + "yes"-*) runtests_opt="--runtests" ;; + "x86_64-host"-x86_64) runtests_opt="--runtests" ;; + *) runtests_opt="" ;; + esac + + if $try_bootstrap; then + bootstrap="--bootstrap" + else + bootstrap="" + fi + + if [ x"$log_name" != x"" ]; then + eval "logname_opt=\"--logname $log_name\"" + fi + + if $rebuild; then + norebuild="" + else + norebuild="--norebuild" + fi + + # Calculate session's RAM size to be used in ulimit. + # This limit is per-process, so, effectively, they have 2-4GB. + session_ram="$(free | grep "Mem:" | sed -e "s/Mem: *\([0-9]*\).*/\1/")" + session_ram="$(($session_ram / 8))" + ulimit -u 5000 + ulimit -d $session_ram + ulimit -v $session_ram + + session_id=$(schroot -b -c chroot:$schroot_image --preserve-environment) + BUILD_SHELL="schroot -r -c session:$session_id --preserve-environment -- bash" + $BUILD_SHELL -c "echo \"Build session is up; ulimit config:\"; ulimit -a" + + # Sometimes /dev/pts can't get unmounted on the first try. + # Workaround by retrying. + trap "schroot -f -e -c session:$session_id || sleep 60 || schroot -f -e -c session:$session_id" 0 1 2 3 5 9 13 15 + + ${BUILD_SHELL} -x ./jenkins.sh --target ${target} --gcc-branch ${gcc_branch} --languages ${languages} $bootstrap $runtests_opt --excludecheck ${excludecheck} --fileserver ex40-01.tcwglab.linaro.org/snapshots-ref --logserver $log_server $logname_opt $norebuild || result="$?" + + echo "Result of jenkins.sh: $result" + if $dont_fail; then + result="0" + fi + exit $result -- cgit v1.2.3