summaryrefslogtreecommitdiff
path: root/tcwg_kernel-build.sh
AgeCommit message (Collapse)Author
2021-07-21round-robin scripts: Merge <foo>_url and <foo>_branch into <foo>_gitMaxim Kuvyrkov
Merge git "_url" and "_branch" specification into a single "_git" argument that's constructed from "URL#BRANCH". This argument also has a special value "baseline", which before was a special value of "branch". This rework makes handling of git references simpler and cleaner, especially on the jenkins side. Change-Id: I1c1c07629728c693b8350dfa1b61fe767d5b0a0b
2021-05-03tcwg_kernel-build.sh: Refactor ccache logicMaxim Kuvyrkov
Change-Id: I3a5592e85f4edede3f3854b2e9e915208c5ab15e
2021-04-30tcwg_kernel-build.sh: Speed up bisections of qemu regressionsMaxim Kuvyrkov
... by using ccache for linux builds. Change-Id: Ifc7be118f3d5a5684f001d577d5f265c5d77e12d
2021-04-30tcwg_kernel-build.sh: Fix metric setting for qemu buildMaxim Kuvyrkov
When bisecting boot_linux() failure due to QEMU change we start at build_abe-qemu step, and get result metric set to "-1" by build_llvm step. Consequently, we consider boot_linux() failure as "uninteresting" regression. Change-Id: I364abb5ff828f1555fa82285dfaf58f9819d58e5
2021-02-02tcwg_kernel-build.sh: Use LLD for all LLVM configurationsMaxim Kuvyrkov
Change-Id: I3cbc9d522a31aa1d1de02c5122f66034ea8167ca
2021-01-18tcwg_kernel-build.sh: Use GNU Binutils for LLVM buildsMaxim Kuvyrkov
... since, apparently, clang needs stand-alone assembler for cases that integrated assembler can't handle. This used to work because we had binutils-arm-linux-gnueabihf and binutils-aarch64-linux-gnu packages in the base docker images. Change-Id: I0467b6c062d2e0f090c7e8628c07b6da07cdf4c9
2021-01-04Update expected x86_64 host tuple for ABE buildsMaxim Kuvyrkov
... from x86_64-unknown-linux-gnu to x86_64-pc-linux-gnu after updating config.guess in ABE. Change-Id: I81333036fb8d183ad81e3fa5b5836645e8b6220f
2020-12-21tcwg_kernel-build.sh: Rollback building with LLD for ARM's configsMaxim Kuvyrkov
Change-Id: I11155cfde4134e6662eeeee916e1f1882591e2c1
2020-12-19tcwg_kernel-build.sh: Use LLD for all LLVM configsMaxim Kuvyrkov
Change-Id: I61ecb7d40e205a7e7a3f7fe8d2ff8f6ddce4dde1
2020-12-15Revert "tcwg_{bmk,gnu,kernel}-build.sh: Update to not override passed ↵Maxim Kuvyrkov
rr[components]" This reverts commit 5a80a7248f90c25f983f7412d2432f8f1ad26368. Reason for revert: This was a bad idea. Change-Id: Ib9deb1247ded5714cccc88baf5535892e78f5baa
2020-12-15tcwg_{bmk,gnu,kernel}-build.sh: Update to not override passed rr[components]Maxim Kuvyrkov
Change-Id: I1b2dbfb294e72bab2a14cbb91a4dec03b58a37fb
2020-12-15tcwg_kernel-build.sh: Add missing handling of QEMU componentMaxim Kuvyrkov
Change-Id: Ia67f3edddc29b2f2adb31ea31cbca4da843e3b9d
2020-12-14tcwg_kernel-build.sh: Test booting using just-built QEMUMaxim Kuvyrkov
... instead of distro-provided version of QEMU. Change-Id: I7d3d773b98c21813d07df84150a7028b8405a460
2020-12-11tcwg_kernel-build.sh: Workaround missing QEMUMaxim Kuvyrkov
... which we removed from docker images in favour of building from source. Change-Id: I828d78e2091f0b537207975bb19c23621521ad69
2020-10-27tcwg_kernel-build.sh: Print the toolchain_type when unsupportedChristophe Lyon
This is similar to what tcwg_bmk-build.sh already does. Change-Id: Ifc7876307c164324fbe91049ea3030bd00a7d801
2020-05-22tcwg_bmk-build.sh/tcwg_gnu-build.sh:David Spickett
Mark expected exits It is expected that commands run by run_step can fail and return non zero. This causes the build scripts to exit early and print misleading traceback. So that we only catch unexpected exits, mark expected failures with a magic return code. Only print traceback when the code is different from this. Change-Id: I8b92ca1cb941481d4daa8ab87ee74b2b394b24ac
2020-05-05jenkins-helpers.sh: Add pwd check functionDavid Spickett
Used in other scripts to check that pwd isnt / before deleting things. Change-Id: Id3e284a486f300c97e92f730e84183340c999dd9
2020-04-30round-robin.sh/tcwg_kernel-build.shDavid Spickett
When looking for errors, exclude other uses of grep looking for errors. Without this we get job names with the entire grep line in the title. We could still get spurious names if there were no error lines found, but at least they'll be shorter. Change-Id: Iceb0279dff2bb51ff59977efaf3f0d523c91ce7c
2020-04-28Shellcheck fixes round 3David Spickett
Now using the version that's present in the bionic images. Meaning we have more warnings but can also set the minimum level to ignore a lot of them. Fix the check for whether shellcheck supports --severity. (we have pipefail on, but we expect shellcheck to fail in this case) Change-Id: I296b8554591b7d327c75393e3924184abc6512b7
2020-04-23Shellcheck fixes round 2David Spickett
Also update the sanity check script to include .job files. Change-Id: Ibf72d9ff346ff7b012d4e282a6ac8f3b7e73590d
2020-03-22round-robin.sh: Merge info from "regressions.txt" to "results"Maxim Kuvyrkov
Change-Id: Iba2ba392d0ed6656548ead3245d4d7906bbdfbc0
2020-03-22round-robin.sh: Avoid changing top-level artifacts in no_regression_p predicateMaxim Kuvyrkov
The no_regression_p() predicate function is called from two steps: check_regression and update_baseline. While we want no_regression_p to output regression info during check_regression step, we don't want that during update_baseline (during update_baseline no_regression_p is called to compare current results against pre-baseline ones). To fix the above we generate regression information in artifacts directory of the current step, and copy it to the top-level only during check_regression step. Change-Id: Ib03d82f7afe60c406c7942f2fa086855df371171
2020-03-11Add annotations to round-robin's "results" fileMaxim Kuvyrkov
Annotations provide human-readable comments and data on regressions. For this we ignore all lines in "results" file starting with "#". Change-Id: I31328fe2c13895a7379137b00891a9d2fc0a39d7
2020-02-18Round-robin scripts: improve regression email contentsChristophe Lyon
When a regression occurs after the build phase, don't include harmless errors from the the build stage, and provide info from the test phase. Change-Id: I75ce76e81ecbda4492bb49e7d765c25cac599f12
2020-01-28tcwg_kernel-build.sh: Robustify boot testMaxim Kuvyrkov
... to reduce spurious failures. Pass --foreground to timeout to avoid TTY and signal artifacts, extend timeout (we get 30s boot time on some kernels), and use non-multiplexed qemu serial. Change-Id: I1e4574c815426e8d06d0e052e8eb4710771be26d
2019-12-05tcwg_kernel-build.sh: Implement rr[breakup_updated_components] hookMaxim Kuvyrkov
... and fix tcwg_bmk-build.sh's hook along the way. Bash's read() accepts only complete lines, so we need to add newlines (using echo). Change-Id: I62950c598872dd23bef4aea3d981f09c1fa14945
2019-08-12tcwg_kernel-build.sh: Increase timeout for qemu to boot kernelMaxim Kuvyrkov
We are hitting the timeout on some of the good builds. Change-Id: I3187d8cec3031f907b342eed65534879d6150f76
2019-07-26round-robin.sh: Stop bisecting non-interesting regressionsMaxim Kuvyrkov
Currently we bisect regressions in all components equally, even when it means running benchmarks to bisect binutils, gcc or llvm internal build failures. This patch changes that by starting bisections only when the build progressed far enough to be interesting. For tcwg_kernel this means to reach kernel build step; for tcwg_bmk this means to reach benchmarking step; and for tcwg_gnu nothing is changing for now. Change-Id: I1c7c15e84fc3fd219108b0af549594be6b381768
2019-04-27tcwg_*-build.sh: Don't require repo urls when we don't need themMaxim Kuvyrkov
We need repo URLs only when not using baseline branches (baseline branches are stored in known repos at git.l.o/toolchain/ci/*). We refactor build_abe() to not rely on repo URLs, ABE only uses last element of URLs path, so we fudge URL for it. Change-Id: I19b6b5da51c8737b7176492e04e734f618d1d606
2019-04-16round-robin.sh: Add ${rr[update_baseline]} "rebase" capabilityMaxim Kuvyrkov
When initial results of CI jobs are not ideal we may be interested in exporing whether earlier versions of components gave better results. This is useful for general book-keeping, and as basis for manual bisections. E.g., for code-size benchmarking we have started with gcc-8 branches, but, ideally, also want to check whether gcc-7, gcc-6, and earlier branches might have provided smaller binaries. For this we add "rebase" mode for update_baseline parameter. This mode is intended to be manually selected in jenkins web-UI, along with component versions pre-dating earliest result recorded in base-artifacts.git repo. The essence of this mode is to push results to the bottom of base-artifacts.git history, rather than the top. For code-size example we would trigger builds for gcc versions from latest to earliest: gcc-7, gcc-6, gcc-5, and so on. Note that "rebase" builds don't change apparent baseline viewed by normal builds. Change-Id: I0b0590a90460a1cd273165c0bf270a4cb227515a
2019-04-16round-robin.sh: Refactor reset_baseline into update_baselineMaxim Kuvyrkov
Our handling of baseline result currently depend on 2 variables: ${rr[reset_baseline]} and ${rr[init_configuration]}. This patch merges these two into ${rr[update_baseline]} with update/reset/init values. This patch is a cleanup before adding new value "rebase" for ${rr[update_baseline]} variable. Change-Id: I91e0604ac5a35b30ed458946d1c591fabcb8bc5c
2019-02-26tcwg_kernel-build.sh: Restrict linking with LLD to defconfigMaxim Kuvyrkov
Many configurations seems to fail. Below are some examples: - llvm-master-aarch64-lts-allmodconfig -- produces 2k less .o files - llvm-master-arm-next-allmodconfig -- produces 4k less .o files - llvm-master-aarch64-next-allmodconfig -- produces 5k less .o files - llvm-release-aarch64-lts-allnoconfig -- can't boot - llvm-release-aarch64-mainline-allnoconfig -- can't boot Change-Id: I5e88e83579e6acbf75aaf850b3defcf5d4ed850a
2019-02-25tcwg_kernel-build.sh: Use LLD for LLVM Linux kernel link jobsPeter Smith
It is expected that developers using clang to build the linux kernel will also use LLD for the linker. We would like to test this in the LLVM builds of the linux kernel as much as possible. To use LLD in the kernel build we set LD=/path/to/linker when calling make. At the moment we use LLD for llvm-*-aarch64-*-* builds and for llvm-master-arm-*-* builds. Change-Id: Ib1d543480278abec193cde6aeba0f457bcd603aa
2019-02-22tcwg_kernel-build.sh: Update build step nameMaxim Kuvyrkov
I missed this change in the rename commit. Change-Id: I82e5e93fe52e8e53d0ca9cfc95b70dda8485e2fb
2019-02-22tcwg_kernel-build.sh: Add boot-testing of kernelMaxim Kuvyrkov
This implements https://projects.linaro.org/browse/TCWG-1503 . Count_linux_objs() was renamed to build_linux (with build_linux() renamed to build_linux_1()). New step boot_linux() was added to boot kernel with qemu. Defconfig configurations for aarch64 and arm seem to boot, allnoconfig doesn't boot, others -- will see. No_regression_p() was reworked to handle result hierarchy "boot" -> "all" -> "Number of objects". Change-Id: Ib3377c72de51745a537714d1c693303b3935188c
2019-02-22Trivial cleanupsMaxim Kuvyrkov
The "last-good" result is, in reality, just "good". We no longer kernel.release file (to troubleshoot ccache issues). Remove "if true". Change-Id: If64798625e693c9abfaf085f6e5b23f77eadf73f
2019-02-22jenkins-helpers.sh: Simplify run_step* functionsMaxim Kuvyrkov
Remove copying of entries from base-artifacts/STEP/ to artifacts/STEP/ for skipped steps. We used to rely on $run_step_prev_artifacts/build-ok markers to detect pass/fail conditions of the previous step -- something that we now explicitly handle with skip_/reset_/stop_on_on_fail modes of run_step(). So remove unused feature. Change-Id: I06e4298aa06ffb2aaf677d2c51e89da61ae9b119
2019-02-18[rr-many 1/N]: Support testing multiple projects in the same buildMaxim Kuvyrkov
This patch series is both a major cleanup and an optimization of round-robin jobs. We switch from testing each component (binutils, gcc, linux) in separate builds in round-robin fashion to testing all components in the same build, and, if there's a failure, re-triggering builds for individual components like we are doing now. Then if individual build fails, it triggers bisect on that one component. The cleanup part is that jenkins triggers are greatly simplified and we can remove all trigger jobs (of which we had hundreds). The optimization part is that successful builds (which is the majority) now consume N times less resources, where N is the number of components -- 3 in case of binutils, gcc, linux, -- because all components are updated and tested in the same build. This patch is the first in the series, and it replaces uses of $current_project and $current_branch with "baseline" keyword of components' branches. I.e., for testing LLVM in LLVM+Kernel jobs we currently use ==rr[llvm_branch] master ==rr[linux_branch] master \ ==rr[current_project] llvm ==rr[current_branch] SHA1 and it will change to ==rr[llvm_branch] SHA1 ==rr[linux_branch] baseline . IMO, the latter is significantly more intuitive. Change-Id: Ib47dcac1571381f870150e4872ec37be5d900a07
2019-02-07tcwg_kernel-*.sh: Avoid proxy variablesMaxim Kuvyrkov
... and use ${rr[X]} instead of $X. We make an exception for $current_project in tcwg_kernel-bisect.sh to do a mechanical change in a separate patch. Change-Id: Ib365552483d016e9096cc791f61a34015e50e32a
2019-01-22jenkins-helpers.sh: Improve run_step functionality.Maxim Kuvyrkov
This is partly fix, partly cleanup. At the moment in bisection mode artifacts/results are not populated until first step successfully executes. This means that for bisections of binutils, gcc, and llvm regressions the results file is empty if the build of these projects fails (i.e., no successful steps at all). This causes empty clauses in the bisection emails due to artifacts/results file being empty. We could have fixed this by adding === Starting Y build <value of successful previous step> === to the top of every build step, but instead we refactor and cleanup run_step support to handle constant-value result entries. In addition to current "stop_on_fail" mode we add "skip_on_fail" and "reset_on_fail" modes, which simplify error handling for most build steps. Change-Id: Ic2d1a15fa490ec25be741cdaf718442260c52e6d
2019-01-22tcwg_kernel-build.sh: Fix bisection of GCC regressionsMaxim Kuvyrkov
I forgot to change the name of GCC's build step from build_abe-gcc to build_abe-stage1 in commit 5d1de6f1 "tcwg_kernel-build.sh: Support building glibc and gcc-stage2", which caused GCC bisections to skip all build steps. We didn't have a GCC regression until last Friday. Change-Id: Ie1242ca5a78bc420d86f241241874b1eb64c7881
2019-01-22tcwg_kernel*: Correct names of *_rev variables.Maxim Kuvyrkov
At the moment *_rev variables, such as current_rev, accept both git branches and git revisions (SHA1s) as values, which is confusing and makes it difficult to write code for manifest generation (manifests need all GIT references resolved at the moment of generation so that reproduction runs sees the "old" state of world). This change standardize the meaning of *_branch and *_rev suffices: *_branch variables accept either SHA1s or git branches and *_rev variables accept only SHA1s. With the established meanings, $bad_rev and $baseline_rev parameters of tcwg_kernel-bisect.sh script can only be SHA1s (which they are anyway in all reasonable cases), which allowed to simplify handling of a few things in tcwg_kernel-bisect.sh script. Change-Id: Ifc52385e4d3aeab2a3b6945fa6e1c88bcc2c7b6d
2019-01-21tcwg_kernel-build.sh: Simplify reproduction logicMaxim Kuvyrkov
Remove "reproduce" mode and follow the manifest. Use dedicated variables for storing projects' SHA1s' in the manifest in clone_repo like we do in all other places. Change-Id: I5407c403cd553bb6103addda0829ba8d0f0869cb
2019-01-16tcwg_kernel-build.sh: Stabilize kernel build for ccacheMaxim Kuvyrkov
Kernel likes to include auto-generated stuff into main headers, which completely breaks ccache optimizations. KBUILD_BUILD_TIMESTAMP is the big one, it's different between builds from the same sources. SUBLEVEL and EXTRAVERSION change often enough to break large bisections. Same for LOCALVERSION. We save kernel.release in artifacts/ to have a record of release strings. Change-Id: I06ed87c554481b5202cde517ee4fbaa6c25e454b
2019-01-11tcwg_kernel-build.sh: Make sure manifest declares variables in the global ↵Maxim Kuvyrkov
namespace. Change-Id: Ic618e76d38a3dc446b6fd29e05caf9987770f01b
2018-12-18tcwg_kernel-build.sh: Add new --mode reproduceMaxim Kuvyrkov
... to reproduce a previous build using manifest. Change-Id: I21521204a3d8b409c7dbf1c45137ddb8c6f85f15
2018-12-18tcwg_kernel-build.sh: Improve checking of parameters.Maxim Kuvyrkov
Change-Id: Iba94ba9ea421f2dc326b8909a71807ebe46a52b4
2018-12-14round-robin.sh, tcwg_kernel-build.sh: Remove ${rr[git_read_only]}Maxim Kuvyrkov
This assert variable turned out to no be useful. Change-Id: Ibea06f6bab6e11ae2625bb1e440fbee1319decf7
2018-12-14tcwg_kernel-build.sh: Move round-robin helpers to round-robin.shMaxim Kuvyrkov
Change-Id: I6753fae4d94add85b5729ea1b121395ae5c679f0
2018-12-12tcwg_kernel-build.sh: Fix typo.Maxim Kuvyrkov
Change-Id: I6bd417e5f36d7df05d530d9633117fce4d9f315f