* [dunfell][PATCH 1/3] CI: report disk usage before/after pruning sstate
@ 2021-06-29 17:33 Jon Mason
2021-06-29 17:33 ` [dunfell][PATCH 2/3] CI: mark build jobs as interruptible Jon Mason
2021-06-29 17:34 ` [dunfell][PATCH 3/3] CI: add testing and testimage Jon Mason
0 siblings, 2 replies; 3+ messages in thread
From: Jon Mason @ 2021-06-29 17:33 UTC (permalink / raw)
To: meta-arm; +Cc: Ross Burton, Ross Burton
From: Ross Burton <ross@burtonini.com>
Change-Id: I66853ce1bf5e33c37094cc8fff04cbd4daaadf91
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
.gitlab-ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4e7cef4..df095c2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -130,7 +130,9 @@ prune-sstate:
stage: prep
when: manual
script:
+ - du -h -s $SSTATE_DIR
- find $SSTATE_DIR -type f -atime +30 -delete
+ - du -h -s $SSTATE_DIR
# Report on disk usage
usage:
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [dunfell][PATCH 2/3] CI: mark build jobs as interruptible
2021-06-29 17:33 [dunfell][PATCH 1/3] CI: report disk usage before/after pruning sstate Jon Mason
@ 2021-06-29 17:33 ` Jon Mason
2021-06-29 17:34 ` [dunfell][PATCH 3/3] CI: add testing and testimage Jon Mason
1 sibling, 0 replies; 3+ messages in thread
From: Jon Mason @ 2021-06-29 17:33 UTC (permalink / raw)
To: meta-arm; +Cc: Ross Burton
From: Ross Burton <ross.burton@arm.com>
Mark the build jobs as interruptible, as they don't write to shared
resources (unlike update-repos or get-binary-toolchains). This means
that if the same branch is pushed again GitLab is likely to be able to
abort the obsolete pipeline to start the new build sooner.
Change-Id: I9284273e9b3118b616d3cb062cb957d98fc5e37e
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.gitlab-ci.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index df095c2..8c2ef59 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -25,6 +25,7 @@ stages:
# Generalised fragment to do a Kas build
.build:
extends: .setup
+ interruptible: true
script:
- KASFILES=$(ci/jobs-to-kas $CI_JOB_NAME)
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [dunfell][PATCH 3/3] CI: add testing and testimage
2021-06-29 17:33 [dunfell][PATCH 1/3] CI: report disk usage before/after pruning sstate Jon Mason
2021-06-29 17:33 ` [dunfell][PATCH 2/3] CI: mark build jobs as interruptible Jon Mason
@ 2021-06-29 17:34 ` Jon Mason
1 sibling, 0 replies; 3+ messages in thread
From: Jon Mason @ 2021-06-29 17:34 UTC (permalink / raw)
To: meta-arm
Add a testing task to the gitlab CI and run testimage in that job.
Currently, it only runs against some of the qemu based machines.
Using slirp, there is no need for a privileged container or tun/tap
devices.
Change-Id: Ia85a3d0089f7d4dc7595c3a45d328c79d8e675f1
Signed-off-by: Jon Mason <jon.mason@arm.com>
---
.gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++------
ci/testimage.yml | 14 +++++++++++++
2 files changed, 62 insertions(+), 6 deletions(-)
create mode 100644 ci/testimage.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8c2ef59..8ee127a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,6 +5,7 @@ stages:
- prep
- bootstrap
- build
+ - test
# Common job fragment to get a worker ready
.setup:
@@ -15,6 +16,7 @@ stages:
SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
DL_DIR: $CI_BUILDS_DIR/persist/downloads
BB_LOGCONFIG: $CI_PROJECT_DIR/ci/logging.yml
+ IMAGE_DIR: $CI_PROJECT_DIR/work/build/tmp/deploy/images
before_script:
- echo KAS_WORK_DIR = $KAS_WORK_DIR
- echo SSTATE_DIR = $SSTATE_DIR
@@ -27,10 +29,29 @@ stages:
extends: .setup
interruptible: true
script:
- - KASFILES=$(ci/jobs-to-kas $CI_JOB_NAME)
- - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- - kas build $KASFILES
- - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+ - KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
+ - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
+ - kas build $KASFILES
+ - ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
+
+.build_artifacts:
+ artifacts:
+ paths:
+ - $IMAGE_DIR/*
+ expire_in: 1 day
+
+.test:
+ extends: .setup
+ stage: test
+ # Unique before_script here to avoid the rm from the one in .setup
+ before_script:
+ - mkdir --verbose --parents $KAS_WORK_DIR $KAS_REPO_REF_DIR $SSTATE_DIR $DL_DIR $TOOLCHAIN_DIR
+ script:
+ - KASFILES=$(./ci/jobs-to-kas $CI_JOB_NAME)
+ # These are needed to avoid warnings about file permissions from the artifacts
+ - sudo chown -R builder $KAS_WORK_DIR
+ - sudo chgrp -R builder $KAS_WORK_DIR
+ - kas build $KASFILES -c testimage
#
@@ -90,15 +111,36 @@ n1sdp/armgcc:
extends: .build
qemuarm:
- extends: .build
+ extends:
+ - .build
+ - .build_artifacts
qemuarmv5:
- extends: .build
+ extends:
+ - .build
+ - .build_artifacts
tc0:
extends: .build
+#
+# Third phase, the test jobs
+#
+
+# QEMU based machines can use testimage, others will need something else (i.e., LAVA)
+
+qemuarm/testimage:
+ extends: .test
+ needs:
+ - job: qemuarm
+
+qemuarmv5/testimage:
+ extends: .test
+ needs:
+ - job: qemuarmv5
+
+
#
# Utility tasks, not executed automatically
#
diff --git a/ci/testimage.yml b/ci/testimage.yml
new file mode 100644
index 0000000..df2c22e
--- /dev/null
+++ b/ci/testimage.yml
@@ -0,0 +1,14 @@
+header:
+ version: 9
+
+local_conf_header:
+ testimage: |
+ IMAGE_CLASSES += "testimage"
+ slirp: |
+ TEST_RUNQEMUPARAMS = "slirp"
+ TEST_SERVER_IP = "127.0.0.1"
+ QEMU_USE_SLIRP = "1"
+
+# Multiple targets are available, put it down to just one
+target:
+ - core-image-base
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-29 17:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-29 17:33 [dunfell][PATCH 1/3] CI: report disk usage before/after pruning sstate Jon Mason
2021-06-29 17:33 ` [dunfell][PATCH 2/3] CI: mark build jobs as interruptible Jon Mason
2021-06-29 17:34 ` [dunfell][PATCH 3/3] CI: add testing and testimage Jon Mason
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).