- job: name: tcwg-llvm-testsuite project-type: matrix defaults: global properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-build - job-cancel - build-discarder: days-to-keep: 10 num-to-keep: 10 parameters: - string: name: toolchain default: '' description: 'URL of the toolchain to use. This needs to be a tarball with a /bin directory inside with either GCC or LLVM from make install' - string: name: build_container_tag default: 'xenial' description: 'Type of image to use in the container: trusty, xenial.' - string: name: target_list default: 'tcwg-tk1_32-build tcwg-apm_64-build' description: 'List of targets -- tcwg-x86_64-cam tcwg-tk1_32-build tcwg-apm_64-build -- should be a subset of slave axis' disabled: false node: tcwg-coordinator retry-count: 3 concurrent: true display-name: 'TCWG LLVM Test-Suite' scm: - git: url: http://git.linaro.org/toolchain/jenkins-scripts.git refspec: +refs/heads/master:refs/remotes/origin/master name: origin branches: - refs/heads/master skip-tag: true shallow-clone: true wipe-workspace: true axes: - axis: type: slave name: label values: - tcwg-x86_64-cam - tcwg-tk1_32-build - tcwg-apm_64-build - axis: type: dynamic name: target values: - target_list execution-strategy: combination-filter: | label==target sequential: false wrappers: - timeout: timeout: 300 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - build-name: name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}' builders: - shell: | #!/bin/bash set -exu . jenkins-helpers.sh if [ "${toolchain:+set}" != "set" ]; then echo "Test-suite needs a toolchain to test" exit 1 fi # Select builder arch/type/container case ${label} in tcwg-x86_64-build|tcwg-x86_64-cam) builder_arch=amd64 ;; tcwg-tk1_32-build) builder_arch=armhf ;; tcwg-apm_64-build) builder_arch=arm64 ;; *) echo "ERROR: Unsupported label: $label"; exit 1 ;; esac # Start build container builder=$(print_host_for_node $NODE_NAME) bash ${WORKSPACE}/start-container-docker.sh --arch ${builder_arch} --distro ${build_container_tag} --session-host ${builder} > build-container.sh # Define CONTAINER, CONTAINER_CLEANUP, session_host and session_port . ./build-container.sh BUILD_CONTAINER="${CONTAINER}" BUILD_CONTAINER_CLEANUP="${CONTAINER_CLEANUP}" # Make sure to cleanup build container if something goes # wrong when preparing the test environment if [ "${BUILD_CONTAINER_CLEANUP:+set}" = "set" ]; then CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}" trap "${CONTAINERS_CLEANUP}" EXIT fi # Setup job parameters and run ${BUILD_CONTAINER} "cd ${WORKSPACE} && bash -x ${WORKSPACE}/tcwg-llvm-testsuite.sh \ --workspace=${WORKSPACE} \ --toolchain=${toolchain}"