- project: name: tcwg_bmk binutils_url: https://sourceware.org/git/binutils-gdb.git gcc_url: https://github.com/gcc-mirror/gcc.git glibc_url: https://sourceware.org/git/glibc.git hw: - tk1: target: arm node: tcwg-x86_64-build_bmk_tk1 - tx1: target: aarch64 node: tcwg-x86_64-build_bmk_tx1 toolchain_name: - llvm: components: binutils gcc glibc llvm llvm_url: https://github.com/llvm/llvm-project.git - gnu: components: binutils gcc glibc llvm_url: no_llvm_url toolchain_ver: - master: binutils_branch: master gcc_branch: master glibc_branch: master llvm_branch: master - release: binutils_branch: binutils-2_33-branch gcc_branch: releases/gcc-9 glibc_branch: release/2.30/master llvm_branch: release/10.x bmk: - spec2k6 cflags: - Os: cron_schedule: H H H/2 * * - Os_LTO: cron_schedule: H H H/2 * * - Oz: cron_schedule: H H H/2 * * - Oz_LTO: cron_schedule: H H H/2 * * - O2: cron_schedule: H H H/3 * * - O2_LTO: cron_schedule: H H H/3 * * - O3: cron_schedule: H H H/3 * * - O3_LTO: cron_schedule: H H H/3 * * - Os-vs-Os_LTO: cron_schedule: H H H/3 * * - O2-vs-O2_LTO: cron_schedule: H H H/3 * * - O3-vs-O3_LTO: cron_schedule: H H H/3 * * jobs: - 'tcwg_bmk_{hw}-build-{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' - 'tcwg_bmk_{hw}-bisect-{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' exclude: - toolchain_name: gnu cflags: Oz - toolchain_name: gnu cflags: Oz_LTO - toolchain_name: llvm cflags: Os-vs-Os_LTO - toolchain_name: llvm cflags: O2-vs-O2_LTO - toolchain_name: llvm cflags: O3-vs-O3_LTO - view: name: tcwg_bmk view-type: list regex: 'tcwg_bmk_.*' - scm: name: binutils-scm scm: - git: url: '{binutils_url}' branches: - 'refs/heads/{binutils_branch}' basedir: binutils skip-tag: true 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 reference-repo: /home/tcwg-buildslave/snapshots-ref/gcc.git wipe-workspace: false clean: before: true prune: true - scm: name: glibc-scm scm: - git: url: '{glibc_url}' branches: - 'refs/heads/{glibc_branch}' basedir: glibc skip-tag: true reference-repo: /home/tcwg-buildslave/snapshots-ref/glibc.git wipe-workspace: false clean: before: true prune: true - scm: name: clang-scm scm: - git: url: '{llvm_url}' branches: - 'refs/heads/{llvm_branch}' basedir: llvm skip-tag: true reference-repo: /home/tcwg-buildslave/snapshots-ref/llvm-project.git wipe-workspace: false clean: before: true prune: true - scm: name: gnu-scm scm: - binutils-scm: binutils_url: '{binutils_url}' binutils_branch: '{binutils_branch}' - gcc-scm: gcc_url: '{gcc_url}' gcc_branch: '{gcc_branch}' - glibc-scm: glibc_url: '{glibc_url}' glibc_branch: '{glibc_branch}' - scm: name: llvm-scm scm: - gnu-scm: binutils_url: '{binutils_url}' binutils_branch: '{binutils_branch}' gcc_url: '{gcc_url}' gcc_branch: '{gcc_branch}' glibc_url: '{glibc_url}' glibc_branch: '{glibc_branch}' - clang-scm: llvm_url: '{llvm_url}' llvm_branch: '{llvm_branch}' - scm: name: bmk-scripts scm: - git: url: https://git.linaro.org/toolchain/bmk-scripts.git refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/* branches: - $bmk_branch basedir: bmk-scripts skip-tag: true reference-repo: /home/tcwg-buildslave/snapshots-ref/bmk-scripts.git wipe-workspace: false clean: before: true prune: true - property: name: default-properties properties: - authorization: tcwg-benchmark: - job-read - job-extended-read - job-build - job-cancel - build-discarder: days-to-keep: 30 num-to-keep: 30 - parameter: name: gnu-parameters parameters: - string: name: binutils_url default: '{binutils_url}' description: "binutils git URL" - string: name: binutils_branch default: '{default_branch}' description: "binutils branch or sha1 to build, or 'baseline'" - string: name: gcc_url default: '{gcc_url}' description: "gcc git URL" - string: name: gcc_branch default: '{default_branch}' description: "gcc branch or sha1 to build, or 'baseline'" - string: name: glibc_url default: '{glibc_url}' description: "glibc git URL" - string: name: glibc_branch default: '{default_branch}' description: "glibc branch or sha1 to build, or 'baseline'" - parameter: name: llvm-parameters parameters: - gnu-parameters: binutils_url: '{binutils_url}' gcc_url: '{gcc_url}' glibc_url: '{glibc_url}' default_branch: '{default_branch}' - string: name: llvm_url default: '{llvm_url}' description: "llvm git URL" - string: name: llvm_branch default: '{default_branch}' description: "llvm branch or sha1 to build, or 'baseline'" - parameter: name: default-parameters parameters: - string: name: extra_build_params default: "" description: "Extra parameters to pass to the build script" - string: name: mail_recipients default: default description: "Comma-separated list of email recipients; use 'default' unless testing" - string: name: distro default: bionic description: 'Distro image to use' - string: name: scripts_branch default: master description: 'Scripts revision to use' - string: name: bmk_branch default: master description: 'Benchmark scripts revision to use' - scm: name: jenkins-scripts scm: - git: url: https://git.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 - builder: name: trigger-followup-builds builders: - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - shell: | #!/bin/bash set -ex for i in artifacts/trigger-build-* artifacts/trigger-bisect; do if [ -f $i ]; then echo "mail_recipients=$mail_recipients" >> $i echo "distro=$distro" >> $i echo "scripts_branch=$scripts_branch" >> $i echo "bmk_branch=$bmk_branch" >> $i fi done - trigger-builds: - project: tcwg_bmk_{hw}-build-{ci_config} parameter-factories: - factory: filebuild file-pattern: artifacts/trigger-build-* - project: tcwg_bmk_{hw}-bisect-{ci_config} property-file: artifacts/trigger-bisect - job-template: name: tcwg_bmk_{hw}-build-{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags} project-type: freestyle defaults: global properties: - default-properties - build-blocker: blocking-jobs: - "tcwg_bmk_{hw}-build" - "tcwg_bmk_{hw}-bisect" - "tcwg_bmk_{hw}-bisect-{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}" queue-scanning: 'ALL' parameters: - '{toolchain_name}-parameters': binutils_url: '{binutils_url}' gcc_url: '{gcc_url}' glibc_url: '{glibc_url}' llvm_url: '{llvm_url}' default_branch: default - choice: name: update_baseline choices: - update - reset - init - push description: "What to do with baseline in this build" - default-parameters disabled: false node: '{node}' concurrent: false display-name: 'TCWG Build tcwg_bmk_{hw}/{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER scm: - jenkins-scripts - bmk-scripts - '{toolchain_name}-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}' glibc_url: '{glibc_url}' glibc_branch: '{glibc_branch}' triggers: - pollscm: cron: '{cron_schedule}' 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" branch_opt="" i=2 for c in {components}; do eval "b=\$$$${{c}}_branch" if [ x"$b" = x"default" ]; then eval "b=\$GIT_COMMIT_$i" fi if [ x"$b" != x"baseline" ]; then build_name="$build_name-$c" branch_opt="$branch_opt ==rr[${{c}}_branch] $b" fi i=$(($i+1)) done ./jenkins-scripts/docker-run.sh \ --distro $distro \ --ssh_info true \ -- \ ./jenkins-scripts/tcwg_bmk-build.sh \ %% artifacts/jenkins/manifest.sh \ --BUILD_URL "$BUILD_URL" \ --scripts_branch "$scripts_branch" \ --bmk_branch "$bmk_branch" \ ==rr[ci_project] tcwg_bmk_{hw} \ ==rr[ci_config] {toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags} \ ==rr[binutils_url] {binutils_url} \ ==rr[gcc_url] {gcc_url} \ ==rr[glibc_url] {glibc_url} \ ==rr[llvm_url] {llvm_url} \ $branch_opt \ ==rr[mode] "jenkins-full" \ ==rr[update_baseline] "$update_baseline" \ $extra_build_params & res=0 && wait $! || res=$? if [ $res != 0 ]; then touch artifacts/failures fi if [ -e artifacts/results ]; then build_name="$build_name-R$(tail -n1 artifacts/results)" fi if [ x"$update_baseline" != x"update" ]; then build_name="$build_name-$update_baseline" fi if [ -f artifacts/trigger-bisect ]; then build_name="$build_name-bisect" fi echo "$build_name" > artifacts/jenkins/build-name - trigger-followup-builds: hw: '{hw}' ci_config: '{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' - shell: | #!/bin/bash if [ -f artifacts/failures ]; then exit 1 fi publishers: - archive: artifacts: 'artifacts/**' latest-only: false - job-template: name: tcwg_bmk_{hw}-bisect-{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags} 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_bmk_{hw}-build" - "tcwg_bmk_{hw}-bisect" - "tcwg_bmk_{hw}-bisect-.*" queue-scanning: 'BUILDABLE' parameters: - string: name: current_project default: "" description: "Project to bisect" - string: name: baseline_branch default: "baseline" description: "Baseline branch or sha1" - string: name: bad_branch default: "" description: "Bad branch or sha1" - default-parameters disabled: false node: '{node}' concurrent: false display-name: 'TCWG Bisect tcwg_bmk_{hw}/{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER scm: - jenkins-scripts - bmk-scripts wrappers: - timeout: timeout: 2880 - 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 "christophe.lyon@linaro.org" > artifacts/jenkins/mail-recipients.txt echo "Build $BUILD_URL failed" > artifacts/jenkins/mail-body.txt ./jenkins-scripts/docker-run.sh \ --distro $distro \ --ssh_info true \ -- \ ./jenkins-scripts/round-robin-bisect.sh \ %% artifacts/manifests/bisect.sh \ --BUILD_URL "$BUILD_URL" \ --current_project "$current_project" \ --baseline_branch "$baseline_branch" \ --bad_branch "$bad_branch" \ --build_script "./jenkins-scripts/tcwg_bmk-build.sh" \ -- \ --scripts_branch "$scripts_branch" \ --bmk_branch "$bmk_branch" \ ==rr[ci_project] tcwg_bmk_{hw} \ ==rr[ci_config] {toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags} \ ==rr[binutils_url] {binutils_url} \ ==rr[gcc_url] {gcc_url} \ ==rr[glibc_url] {glibc_url} \ ==rr[llvm_url] {llvm_url} \ $extra_build_params if [ x"$mail_recipients" != x"default" ]; then echo "$mail_recipients" > artifacts/jenkins/mail-recipients.txt fi - trigger-followup-builds: hw: '{hw}' ci_config: '{toolchain_name}-{toolchain_ver}-{target}-{bmk}-{cflags}' 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 - project: name: tcwg_bmk-dev hw: - tk1: node: tcwg-x86_64-build_bmk_tk1 - tx1: node: tcwg-x86_64-build_bmk_tx1 jobs: - 'tcwg_bmk_{hw}-build' - 'tcwg_bmk_{hw}-bisect' - view: name: tcwg_bmk-dev view-type: list job-name: - tcwg_bmk_tk1-build - tcwg_bmk_tk1-bisect - tcwg_bmk_tx1-build - tcwg_bmk_tx1-bisect - tcwg-benchmark - builder: name: trigger-followup-builds2 builders: - build-name-setter: name: 'artifacts/jenkins/build-name' file: true - shell: | #!/bin/bash set -ex for i in artifacts/trigger-build-* artifacts/trigger-bisect; do if [ -f $i ]; then echo "ci_project=$ci_project" >> $i echo "ci_config=$ci_config" >> $i echo "binutils_url=$binutils_url" >> $i echo "gcc_url=$gcc_url" >> $i echo "glibc_url=$glibc_url" >> $i echo "llvm_url=$llvm_url" >> $i echo "mail_recipients=$mail_recipients" >> $i echo "distro=$distro" >> $i echo "scripts_branch=$scripts_branch" >> $i echo "bmk_branch=$bmk_branch" >> $i fi done - trigger-builds: - project: tcwg_bmk_{hw}-build parameter-factories: - factory: filebuild file-pattern: artifacts/trigger-build-* - project: tcwg_bmk_{hw}-bisect property-file: artifacts/trigger-bisect - job-template: name: tcwg_bmk_{hw}-build project-type: freestyle defaults: global properties: - default-properties - build-blocker: blocking-jobs: - "tcwg_bmk_{hw}-bisect" queue-scanning: 'ALL' parameters: - string: name: ci_project default: 'tcwg_bmk_{hw}_dev' description: "CI project ID; used as namespace for git branches" - string: name: ci_config default: gnu-release-aarch64-spec2k6-O2 description: "CI configuration ID: {{toolchain_name}}-{{toolchain_ver}}-{{target}}-{{bmk}}-{{cflags}}" - llvm-parameters: binutils_url: https://sourceware.org/git/binutils-gdb.git gcc_url: https://github.com/gcc-mirror/gcc.git glibc_url: https://sourceware.org/git/glibc.git llvm_url: https://github.com/llvm/llvm-project.git default_branch: baseline - choice: name: update_baseline choices: - update - reset - init - push description: "What to do with baseline in this build" - default-parameters disabled: false node: '{node}' concurrent: false display-name: 'TCWG Build tcwg_bmk_{hw}' workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER scm: - jenkins-scripts - bmk-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-$ci_project/$ci_config" branch_opt="" for c in binutils gcc glibc llvm; do eval "b=\$$$${{c}}_branch" if [ x"$b" != x"baseline" ]; then build_name="$build_name-$c" branch_opt="$branch_opt ==rr[${{c}}_branch] $b" fi done ./jenkins-scripts/docker-run.sh \ --distro $distro \ --ssh_info true \ -- \ ./jenkins-scripts/tcwg_bmk-build.sh \ %% artifacts/jenkins/manifest.sh \ --BUILD_URL "$BUILD_URL" \ --scripts_branch "$scripts_branch" \ --bmk_branch "$bmk_branch" \ ==rr[ci_project] $ci_project \ ==rr[ci_config] $ci_config \ ==rr[binutils_url] $binutils_url \ ==rr[gcc_url] $gcc_url \ ==rr[glibc_url] $glibc_url \ ==rr[llvm_url] $llvm_url \ $branch_opt \ ==rr[mode] "jenkins-full" \ ==rr[update_baseline] "$update_baseline" \ $extra_build_params & res=0 && wait $! || res=$? if [ $res != 0 ]; then touch artifacts/failures fi if [ -e artifacts/results ]; then build_name="$build_name-R$(tail -n1 artifacts/results)" fi if [ x"$update_baseline" != x"update" ]; then build_name="$build_name-$update_baseline" fi if [ -f artifacts/trigger-bisect ]; then build_name="$build_name-bisect" fi echo "$build_name" > artifacts/jenkins/build-name - trigger-followup-builds2: hw: '{hw}' - shell: | #!/bin/bash if [ -f artifacts/failures ]; then exit 1 fi publishers: - archive: artifacts: 'artifacts/**' latest-only: false - job-template: name: tcwg_bmk_{hw}-bisect project-type: freestyle defaults: global properties: - default-properties parameters: - string: name: ci_project default: 'tcwg_bmk_{hw}_dev' description: "CI project ID; used as namespace for git branches" - string: name: ci_config default: gnu-release-aarch64-spec2k6-O2 description: "CI configuration ID: {{toolchain_name}}-{{toolchain_ver}}-{{target}}-{{bmk}}-{{cflags}}" - string: name: binutils_url default: https://sourceware.org/git/binutils-gdb.git description: "binutils git URL" - string: name: gcc_url default: https://github.com/gcc-mirror/gcc.git description: "gcc git URL" - string: name: glibc_url default: https://sourceware.org/git/glibc.git description: "glibc git URL" - string: name: llvm_url default: https://github.com/llvm/llvm-project.git description: "llvm git URL" - string: name: current_project default: "" description: "Project to bisect" - string: name: baseline_branch default: "baseline" description: "Baseline branch or sha1" - string: name: bad_branch default: "" description: "Bad branch or sha1" - file: name: jenkins-scripts/replay_log description: "Replay part of bisect using provided bisect log" - default-parameters disabled: false node: '{node}' concurrent: false display-name: 'TCWG Bisect tcwg_bmk_{hw}' workspace: workspace/tcwg_bmk_$EXECUTOR_NUMBER scm: - jenkins-scripts - bmk-scripts wrappers: - timeout: timeout: 2880 - 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-$ci_project/$ci_config-$current_project" echo "$build_name" > artifacts/jenkins/build-name # artifacts/jenkins/mail-*.txt will be overwritten in successful builds. echo "christophe.lyon@linaro.org" > artifacts/jenkins/mail-recipients.txt echo "Build $BUILD_URL failed" > artifacts/jenkins/mail-body.txt ./jenkins-scripts/docker-run.sh \ --distro $distro \ --ssh_info true \ -- \ ./jenkins-scripts/round-robin-bisect.sh \ %% artifacts/manifests/bisect.sh \ --BUILD_URL "$BUILD_URL" \ --current_project "$current_project" \ --baseline_branch "$baseline_branch" \ --bad_branch "$bad_branch" \ --replay_log "$(pwd)/jenkins-scripts/replay_log" \ --build_script "./jenkins-scripts/tcwg_bmk-build.sh" \ -- \ --scripts_branch "$scripts_branch" \ --bmk_branch "$bmk_branch" \ ==rr[ci_project] $ci_project \ ==rr[ci_config] $ci_config \ ==rr[binutils_url] $binutils_url \ ==rr[gcc_url] $gcc_url \ ==rr[glibc_url] $glibc_url \ ==rr[llvm_url] $llvm_url \ $extra_build_params if [ x"$mail_recipients" != x"default" ]; then echo "$mail_recipients" > artifacts/jenkins/mail-recipients.txt fi - trigger-followup-builds2: hw: '{hw}' 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