- job: name: tcwg-llvm-release 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: release default: '' description: 'Release number. Ex. 4.0.1' - string: name: candidate default: '' description: 'RC number. Ex. 1, 2, final' - 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-build tcwg-tk1_32-build tcwg-apm_64-build -- should be a subset of slave axis' - bool: name: testsuite default: true description: 'Whether or not to trigger a test-suite with this build.' disabled: false node: tcwg-coordinator child-workspace: $label concurrent: true display-name: 'TCWG LLVM Release' 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-build - 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: 1200 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' - build-name: name: '#${BUILD_NUMBER}' builders: - shell: | #!/bin/bash set -ex # Until we figure out a way to use heavy-job with different weights # based on the builder, we hardcode to one. weight=1 buildjobs=1 triple="" # Select builder arch/type/container case ${label} in tcwg-x86_64-build) builder_arch=amd64 triple="x86_64-linux-gnu" buildjobs=8 # 1 slot is 32/4 ;; tcwg-tk1_32-build) builder_arch=armhf triple="armv7a-linux-gnueabihf" buildjobs=4 # TK1s only have 4 cores ;; tcwg-apm_64-build) builder_arch=arm64 triple="aarch64-linux-gnu" buildjobs=8 # APMs only have 8 cores ;; *) echo "ERROR: Unsupported label: $label"; exit 1 ;; esac # Start build container builder=$(${WORKSPACE}/nodename2hostname.sh $NODE_NAME) bash ${WORKSPACE}/start-container-docker.sh --arch ${builder_arch} --distro ${build_container_tag} --session-host ${builder} --weight ${weight} > 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}" != "" ]; then CONTAINERS_CLEANUP="${BUILD_CONTAINER_CLEANUP}" trap "${CONTAINERS_CLEANUP}" EXIT fi # Setup job parameters and run (for now, just pretend to run) ret=0 ${BUILD_CONTAINER} "cd ${WORKSPACE} && bash -x ${WORKSPACE}/tcwg-llvm-release.sh \ --workspace=${WORKSPACE} \ --release=${release} \ --candidate=${candidate} \ --buildjobs=${buildjobs} \ --toolchain=${toolchain}" || ret=$? if [ $ret -ne 0 ]; then touch llvm.failed fi # Chained jobs rctag="-rc${candidate}" if [ "${candidate}" = "final" ]; then rctag="" fi fileserver=dev-01.tcwglab url_prefix='~tcwg-buildslave/builds/releases/llvm' target=clang+llvm-${release}${rctag}-${triple} tarball=${target}.tar.xz toolchain_url="http://${fileserver}/${url_prefix}/${tarball}" if ${testsuite}; then cat << EOF > llvm.params.testsuite toolchain=${toolchain_url} target_list=${label} EOF fi # failure is handled by conditional step on llvm.failed # so that the testsuite job is always triggered exit 0 - conditional-step: condition-kind: file-exists condition-filename: llvm.params.testsuite steps: - trigger-builds: - project: 'tcwg-llvm-testsuite' property-file: llvm.params.testsuite current-parameters: true block: true - conditional-step: condition-kind: file-exists condition-filename: llvm.failed steps: - shell: "exit 1"