aboutsummaryrefslogtreecommitdiff
path: root/tcwg-buildfarm-2steps-master-cambridge.yaml
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2015-10-28 11:15:23 +0100
committerLinaro Code Review <review@review.linaro.org>2015-10-28 10:19:00 +0000
commitcc2e9a0ad40e7fb2930c4bcf9f505b3a5975b47b (patch)
treeaa4a04a63d251ad19f4bb039ee91892582aa6614 /tcwg-buildfarm-2steps-master-cambridge.yaml
parent6b734b9fbe0b9b5535747e76b33256c70539033a (diff)
tcwg-buildfarm-master-cambridge-01
tcwg-buildfarm-2steps-master-cambridge: Cleanup. tcwg-buildfarm-2steps-master-cambridge is a copy of tcwg-buildfarm-master-cambridge-01 with the support to reserve a tester to execute the tests as a 2nd step. It serves as a prototype, in conjonction with tcwg-cross-check-master-cambridge. tcwg-buildfarm-master-cambridge-01 is back to its original state and purpose. Change-Id: I8e40555ba95b559f19aee486777d3dec6953b11d
Diffstat (limited to 'tcwg-buildfarm-2steps-master-cambridge.yaml')
-rw-r--r--tcwg-buildfarm-2steps-master-cambridge.yaml199
1 files changed, 199 insertions, 0 deletions
diff --git a/tcwg-buildfarm-2steps-master-cambridge.yaml b/tcwg-buildfarm-2steps-master-cambridge.yaml
new file mode 100644
index 0000000..4951061
--- /dev/null
+++ b/tcwg-buildfarm-2steps-master-cambridge.yaml
@@ -0,0 +1,199 @@
+- job:
+ name: tcwg-buildfarm-master-cambridge-01
+ 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: target
+ default: 'aarch64-none-elf'
+ description: 'Target 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-cam
+ retry-count: 3
+ concurrent: true
+ display-name: 'TCWG BuildFarm master on Cambridge 01'
+ scm:
+ - git:
+ url: https://git-us.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-build-01
+ wrappers:
+ - timeout:
+ timeout: 600
+ - timestamps
+ - ssh-agent-credentials:
+ # tcwg-buildslave user id
+ users:
+ - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
+ - build-name:
+ name: '#${BUILD_NUMBER}-${ENV,var="gcc_branch"}'
+ 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
+
+ ulimit -u 5000
+
+ 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
+
+ result=0
+ case $target in
+ aarch64-linux-gnu)
+ # Since we are cross-testing, prepare environment for
+ # another Jenkins jobs which will be launched on the
+ # tester machine. It will remotely start the build+check
+ # on the builder machine.
+ echo "#!/bin/sh" > cross_check_script_$target
+ echo "cd `pwd`" >> cross_check_script_$target
+ echo "echo Running on: ; hostname -f" >> cross_check_script_$target
+ echo "echo Tester: \$1" >> cross_check_script_$target
+ echo "sed -i config/boards/infra-tcwglab-armv8.exp -e \"s/set_board_info hostname .*/set_board_info hostname \$1/\"" >> cross_check_script_$target
+ echo "cat config/boards/infra-tcwglab-armv8.exp" >> cross_check_script_$target
+ # Command to build the toolchain and execute the tests, using the original env variables.
+ echo "ulimit -u 5000" >> cross_check_script_$target
+ echo "export WORKSPACE=$WORKSPACE" >> cross_check_script_$target
+ echo "export node_selector=$node_selector" >> cross_check_script_$target
+ echo "export JOB_NAME=$JOB_NAME" >> cross_check_script_$target
+ echo "export NODE_NAME=$NODE_NAME" >> cross_check_script_$target
+ echo "export BUILD_NUMBER=$BUILD_NUMBER" >> cross_check_script_$target
+ echo "session_id=\$(schroot -b -c chroot:$schroot_image --preserve-environment)" >> cross_check_script_$target
+ echo BUILD_SHELL=\"schroot -r -c session:\$session_id --preserve-environment -- bash\" >> cross_check_script_$target
+ echo '${BUILD_SHELL} -c "echo \"Build session is up; ulimit config:\"; ulimit -a"' >> cross_check_script_$target
+ echo '${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 >> cross_check_script_$target
+ cat cross_check_script_$target
+ echo "cross_check_script_path=`pwd`/cross_check_script_$target" >> cross_check_parameters_$target
+ echo "builder=`hostname -f` " >> cross_check_parameters_$target
+ cat cross_check_parameters_$target
+ ;;
+ *)
+ ${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="$?"
+ ;;
+ esac
+
+ echo "Result of jenkins.sh build: $result"
+ if $dont_fail; then
+ result="0"
+ fi
+ exit $result
+ - trigger-builds:
+ - project: tcwg-cross-check-master-cambridge
+ parameter-factories:
+ - factory: filebuild
+ file-pattern: cross_check_parameters_*
+ property-file-fail-on-missing: true
+ block: true