Commit Graph
5 Commits
Author SHA1 Message Date
Anthony PERARD 21051291ad automation: Rework "build-each-commit-gcc" test
Current issues with this test are:
- when the job timeout, the log file is lost as there is no chance to
  run the `mv` command.
- GitLab job log is limited in size, so one usually have to download
  the artifacts, which may be missing.

Use $GITLAB_CI to detect when the script is run as part of a GitLab
pipeline. GitLab will add "GITLAB_CI=true" in the environment
variables.

When run as part of $GITLAB_CI, ignore "dirty" worktree to allow to
write "build-each-commit-gcc.log", which can then be grabbed as
artifacts, even when the job timeout. The `git clean` command is
changed to keep those build logs.

When run as part of $GITLAB_CI, we will also store the build output in
a log file instead of writing it to stdout, because GitLab's job log
is limited. But we will write the log to stdout in case of error, so
we can find out more quickly why there's been an error.

This patch also make use of a GitLab feature, "log sections", which we
will collapse by default. One section per commit been built.

There's a bit of colour added to the logs.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2024-02-26 16:05:59 +01:00
Wei Liu 1d1f161153 gitlab-ci: allow specifying base and tip in build test
We will soon provide this new capability to humans and automated
systems.

The default behaviour is retained: tip and base are passed by Gitlab
CI.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-05-15 11:01:06 +01:00
Wei Liu 072a96c490 gitlab-ci: use git clean -ffdx in build each commit test
The build script invoked is designed to run in a pristine checkout.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-08 13:28:12 +01:00
Wei Liu 7a01cfaeb0 gitlab-ci: log commit range in build test
It is easier to debug stuff when the target range is clearly visible
at the top.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2019-04-08 11:31:28 +01:00
Wei Liu 1ba432fb73 automation: add a script to build newly pushed commits in Gitlab CI
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
2019-04-05 11:15:36 +01:00