- project: name: tcwg_kernel-llvm toolchain_name: - llvm: binutils_url: no_binutils_url binutils_branch: no_binutils_branch gcc_url: no_gcc_url gcc_branch: no_gcc_branch llvm_url: https://github.com/llvm/llvm-project.git node: tcwg-x86_64-build toolchain_ver: - master: llvm_branch: master - release: llvm_branch: release/8.x target: - aarch64 - arm linux: - next: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git linux_branch: master - mainline: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux_branch: master - stable: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux_branch: linux-4.20.y - lts: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux_branch: linux-4.19.y linux_config: - defconfig - allmodconfig - allyesconfig - allnoconfig component: - llvm - linux jobs: - 'tcwg_kernel-trigger-{component}-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - 'tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - 'tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - view: name: tcwg_kernel-llvm view-type: list regex: 'tcwg_kernel-b.*-llvm.*' - project: name: tcwg_kernel-gnu toolchain_name: - gnu: binutils_url: https://sourceware.org/git/binutils-gdb.git gcc_url: https://gcc.gnu.org/git/gcc.git llvm_url: no_llvm_url llvm_branch: no_llvm_branch node: tcwg-x86_64-1-cam toolchain_ver: - master: binutils_branch: master gcc_branch: master - release: binutils_branch: binutils-2_31-branch gcc_branch: gcc-8-branch target: - aarch64 - arm linux: - next: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git linux_branch: master - mainline: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux_branch: master - stable: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux_branch: linux-4.20.y - lts: linux_url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux_branch: linux-4.19.y linux_config: - defconfig - allmodconfig - allyesconfig - allnoconfig component: - binutils - gcc - linux jobs: - 'tcwg_kernel-trigger-{component}-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - 'tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - 'tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}' - view: name: tcwg_kernel-gnu view-type: list regex: 'tcwg_kernel-b.*-gnu.*' - scm: name: llvm-scm scm: - git: url: '{llvm_url}' branches: - 'refs/heads/{llvm_branch}' basedir: llvm skip-tag: true sparse-checkout: paths: - llvm/README.txt reference-repo: /home/tcwg-buildslave/snapshots-ref/llvm-project-20170507.git wipe-workspace: false clean: before: true prune: true - scm: name: binutils-scm scm: - git: url: '{binutils_url}' branches: - 'refs/heads/{binutils_branch}' basedir: binutils skip-tag: true sparse-checkout: paths: - README reference-repo: /home/tcwg-buildslave/snapshots-ref/binutils-gdb.git wipe-workspace: false clean: before: true prune: true - scm: name: gcc-scm scm: - git: url: '{gcc_url}' branches: - 'refs/heads/{gcc_branch}' basedir: gcc skip-tag: true sparse-checkout: paths: - README reference-repo: /home/tcwg-buildslave/snapshots-ref/gcc.git wipe-workspace: false clean: before: true prune: true - scm: name: linux-scm scm: - git: url: '{linux_url}' branches: - 'refs/heads/{linux_branch}' basedir: linux skip-tag: true sparse-checkout: paths: - README reference-repo: /home/tcwg-buildslave/snapshots-ref/linux.git wipe-workspace: false clean: before: true prune: true - property: name: default_properties properties: - authorization: anonymous: - job-read - job-extended-read linaro: - job-build - job-cancel - build-discarder: days-to-keep: 30 num-to-keep: 30 - job-template: name: tcwg_kernel-trigger-{component}-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} project-type: freestyle defaults: global properties: - default_properties - build-blocker: blocking-jobs: - "tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}" - "tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}" queue-scanning: 'ALL' disabled: false node: tcwg-coordinator concurrent: false display-name: 'TCWG BBB RRv7 Trigger Linux-{linux}-{linux_config} @ {target} @ {toolchain_name}-{toolchain_ver} @ {component}' workspace: workspace/tcwg_kernel-{toolchain_name}/$JOB_NAME scm: - '{component}-scm': llvm_url: '{llvm_url}' llvm_branch: '{llvm_branch}' binutils_url: '{binutils_url}' binutils_branch: '{binutils_branch}' gcc_url: '{gcc_url}' gcc_branch: '{gcc_branch}' linux_url: '{linux_url}' linux_branch: '{linux_branch}' triggers: - pollscm: cron: 'H H H/2 * *' wrappers: - timeout: timeout: 600 - timestamps builders: - trigger-builds: - project: tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} predefined-parameters: | current_project={component} current_branch=$GIT_COMMIT - parameter: name: llvm-parameters parameters: - choice: name: current_project choices: - llvm - linux description: 'Project to {action}' - parameter: name: gnu-parameters parameters: - choice: name: current_project choices: - binutils - gcc - linux description: 'Project to {action}' - scm: name: jenkins-scripts scm: - git: url: https://git-us.linaro.org/toolchain/jenkins-scripts.git refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/* branches: - $scripts_branch basedir: jenkins-scripts skip-tag: true reference-repo: /home/tcwg-buildslave/snapshots-ref/jenkins-scripts.git wipe-workspace: false clean: before: true prune: true - job-template: name: tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} project-type: freestyle defaults: global properties: - default_properties - build-blocker: blocking-jobs: - "tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config}" queue-scanning: 'ALL' parameters: - '{toolchain_name}-parameters': action: build - string: name: current_branch default: default description: "Git rev of $current_project to build" - bool: name: reset_baseline default: false description: "Whether to reset baseline to results of this build" - string: name: distro default: xenial description: 'Distro image to use' - string: name: scripts_branch default: master description: 'Scripts revision to use' disabled: false node: '{node}' concurrent: false display-name: 'TCWG BBB RRv7 Build Linux-{linux}-{linux_config} @ {target} @ {toolchain_name}-{toolchain_ver}' workspace: workspace/tcwg_kernel-build-{toolchain_name}_$EXECUTOR_NUMBER scm: - jenkins-scripts wrappers: - timeout: timeout: 600 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' builders: - shell: | #!/bin/bash set -ex # Delete artifacts now to avoid re-using stale artifacts if # below docker-run.sh fails to start up a container. rm -rf artifacts/ mkdir -p artifacts/jenkins build_name="#$BUILD_NUMBER-$current_project" echo "$build_name" > artifacts/jenkins/build-name - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - shell: | #!/bin/bash set -ex ./jenkins-scripts/docker-run.sh \ --distro $distro \ -- \ ./jenkins-scripts/tcwg_kernel-build.sh \ %% artifacts/jenkins/manifest.sh \ --BUILD_URL "$BUILD_URL" \ ==rr[{toolchain_name}_version] {toolchain_ver} \ ==rr[binutils_url] {binutils_url} ==rr[binutils_branch] {binutils_branch} \ ==rr[gcc_url] {gcc_url} ==rr[gcc_branch] {gcc_branch} \ ==rr[llvm_url] {llvm_url} ==rr[llvm_branch] {llvm_branch} \ ==rr[linux_version] {linux} \ ==rr[linux_url] {linux_url} ==rr[linux_branch] {linux_branch} \ --mode "jenkins-full" \ --current_project "$current_project" \ --current_branch "$current_branch" \ --linux_config "{linux_config}" \ --reset_baseline "$reset_baseline" \ --target "{target}" \ --toolchain "{toolchain_name}" & res=0 && wait $! || res=$? if [ $res != 0 ]; then touch artifacts/failures fi name="#$BUILD_NUMBER-$current_project" if [ -e artifacts/results ]; then name="$name-R$(tail -n1 artifacts/results)" fi if [ -e artifacts/distance-to-baseline ]; then name="$name-B$(cat artifacts/distance-to-baseline)" fi if $reset_baseline; then name="$name-baseline" # Don't trigger bisect if this [possibly failed] build is # the new baseline. rm -f artifacts/trigger-bisect-on-failure fi if [ ! -f artifacts/failures ]; then rm -f artifacts/trigger-bisect-on-failure fi if [ -f artifacts/trigger-bisect-on-failure ]; then name="$name-bisect" echo "distro=$distro" >> artifacts/trigger-bisect-on-failure echo "scripts_branch=$scripts_branch" >> artifacts/trigger-bisect-on-failure fi echo "$name" > artifacts/jenkins/build-name - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - conditional-step: condition-kind: file-exists condition-filename: artifacts/trigger-bisect-on-failure steps: - trigger-builds: - project: tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} property-file: artifacts/trigger-bisect-on-failure - shell: | #!/bin/bash if [ -f artifacts/failures ]; then exit 1 fi publishers: - archive: artifacts: 'artifacts/**' latest-only: false - job-template: name: tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} project-type: freestyle defaults: global properties: - default_properties - build-blocker: # Run at most 1 bisect job for all configurations. # Bisect jobs can easily run for 5+ hours, and a few of them # can hog the entire TCWG build farm for a long time. Since # same regression tends to appear in multiple configurations, # run bisections for all configurations in-order. blocking-jobs: - "tcwg_kernel-bisect-*" queue-scanning: 'BUILDABLE' parameters: - '{toolchain_name}-parameters': action: bisect - string: name: baseline_rev default: default description: "Baseline revision" - string: name: bad_rev default: default description: "Bad revision" - string: name: mail_recipients default: default description: "Comma-separated list of email recipients; use 'default' unless testing" - string: name: distro default: xenial description: 'Distro image to use' - string: name: scripts_branch default: master description: 'Scripts revision to use' disabled: false node: '{node}' concurrent: false display-name: 'TCWG BBB RRv7 Bisect Linux-{linux}-{linux_config} @ {target} @ {toolchain_name}-{toolchain_ver}' workspace: workspace/tcwg_kernel-bisect-{toolchain_name}_$EXECUTOR_NUMBER scm: - jenkins-scripts wrappers: - timeout: timeout: 1440 - timestamps - ssh-agent-credentials: # tcwg-buildslave user id users: - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' builders: - shell: | #!/bin/bash set -ex # Delete artifacts now to avoid re-using stale artifacts if # below docker-run.sh fails to start up a container. rm -rf artifacts/ mkdir -p artifacts/jenkins build_name="#$BUILD_NUMBER-$current_project" echo "$build_name" > artifacts/jenkins/build-name # artifacts/jenkins/mail-*.txt will be overwritten in successful builds. echo "maxim.kuvyrkov@linaro.org" > artifacts/jenkins/mail-recipients.txt echo "Build $BUILD_URL failed" > artifacts/jenkins/mail-body.txt - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - shell: | #!/bin/bash set -ex ./jenkins-scripts/docker-run.sh \ --distro $distro \ -- \ ./jenkins-scripts/tcwg_kernel-bisect.sh \ %% artifacts/manifests/bisect.sh \ --BUILD_URL "$BUILD_URL" \ --baseline_rev "$baseline_rev" \ --bad_rev "$bad_rev" \ --build_script "./jenkins-scripts/tcwg_kernel-build.sh" \ --ci_config {toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} \ --ci_project tcwg_kernel \ -- \ ==rr[{toolchain_name}_version] {toolchain_ver} \ ==rr[binutils_url] {binutils_url} ==rr[binutils_branch] {binutils_branch} \ ==rr[gcc_url] {gcc_url} ==rr[gcc_branch] {gcc_branch} \ ==rr[llvm_url] {llvm_url} ==rr[llvm_branch] {llvm_branch} \ ==rr[linux_version] {linux} \ ==rr[linux_url] {linux_url} ==rr[linux_branch] {linux_branch} \ --current_project "$current_project" \ --linux_config "{linux_config}" \ --target "{target}" \ --toolchain "{toolchain_name}" for i in artifacts/trigger-0-bisect-again artifacts/trigger-1-reset-baseline artifacts/trigger-2-build-master; do if [ -f $i ]; then if [ x"$i" = x"artifacts/trigger-0-bisect-again" ]; then echo "mail_recipients=$mail_recipients" >> $i fi echo "distro=$distro" >> $i echo "scripts_branch=$scripts_branch" >> $i fi done if [ x"$mail_recipients" != x"default" ]; then echo "$mail_recipients" > artifacts/jenkins/mail-recipients.txt fi - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - conditional-step: condition-kind: file-exists condition-filename: artifacts/trigger-0-bisect-again steps: - trigger-builds: - project: tcwg_kernel-bisect-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} property-file: artifacts/trigger-0-bisect-again - conditional-step: condition-kind: file-exists condition-filename: artifacts/trigger-1-reset-baseline steps: - trigger-builds: - project: tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} property-file: artifacts/trigger-1-reset-baseline - conditional-step: condition-kind: file-exists condition-filename: artifacts/trigger-2-build-master steps: - trigger-builds: - project: tcwg_kernel-build-{toolchain_name}-{toolchain_ver}-{target}-{linux}-{linux_config} property-file: artifacts/trigger-2-build-master publishers: - archive: artifacts: 'artifacts/**' latest-only: false - email-ext: recipients: ${{FILE,path="artifacts/jenkins/mail-recipients.txt"}} content-type: text body: | ${{FILE,path="artifacts/jenkins/mail-body.txt"}} failure: true success: true send-to: - recipients