All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][dunfell 1/3] kas: now that linux-stable is unused, remove it from kas
@ 2020-12-17 15:27 Ross Burton
  2020-12-17 15:27 ` [PATCH][dunfell 2/3] ci: make bootstrap just another kas overlay Ross Burton
  2020-12-17 15:27 ` [PATCH][dunfell 3/3] ci: fail any build that emits warnings Ross Burton
  0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2020-12-17 15:27 UTC (permalink / raw)
  To: meta-arm

Change-Id: I263cf1658c6bfc774bcf7b9c24d164003e88f634
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 kas/base.yml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/kas/base.yml b/kas/base.yml
index 5ae3d3e..0035a54 100644
--- a/kas/base.yml
+++ b/kas/base.yml
@@ -25,9 +25,6 @@ repos:
     layers:
       meta-oe:
 
-  meta-kernel:
-    url: https://gitlab.com/openembedded/community/meta-kernel.git
-
 local_conf_header:
   base: |
     CONF_VERSION = "1"
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH][dunfell 2/3] ci: make bootstrap just another kas overlay
  2020-12-17 15:27 [PATCH][dunfell 1/3] kas: now that linux-stable is unused, remove it from kas Ross Burton
@ 2020-12-17 15:27 ` Ross Burton
  2020-12-17 15:27 ` [PATCH][dunfell 3/3] ci: fail any build that emits warnings Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2020-12-17 15:27 UTC (permalink / raw)
  To: meta-arm

Simplify the gitlab-ci by having the bootstrap build as just another Kas
overlay file, so there's no duplication of build script.

Change-Id: I7341750d2ae7f3c146bfe323f61fa98c0f3121c0
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .gitlab-ci.yml    | 6 +-----
 kas/bootstrap.yml | 9 +++++++++
 2 files changed, 10 insertions(+), 5 deletions(-)
 create mode 100644 kas/bootstrap.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1db561c..d771a27 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,13 +36,9 @@ stages:
 
 # Build a number of native tools first to ensure the other builders don't race
 # over them
-bootstrap:
+n1sdp/bootstrap:
   extends: .build
   stage: bootstrap
-  variables:
-    KAS_TARGET: binutils-cross-aarch64 gcc-cross-aarch64 python3-native opkg-native rpm-native
-  script:
-  - kas build kas/n1sdp.yml
 
 # What percentage of machines in the layer do we build
 machine-coverage:
diff --git a/kas/bootstrap.yml b/kas/bootstrap.yml
new file mode 100644
index 0000000..0e05e46
--- /dev/null
+++ b/kas/bootstrap.yml
@@ -0,0 +1,9 @@
+header:
+  version: 9
+
+target:
+  - binutils-cross-aarch64
+  - gcc-cross-aarch64
+  - python3-native
+  - opkg-native
+  - rpm-native
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH][dunfell 3/3] ci: fail any build that emits warnings
  2020-12-17 15:27 [PATCH][dunfell 1/3] kas: now that linux-stable is unused, remove it from kas Ross Burton
  2020-12-17 15:27 ` [PATCH][dunfell 2/3] ci: make bootstrap just another kas overlay Ross Burton
@ 2020-12-17 15:27 ` Ross Burton
  1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2020-12-17 15:27 UTC (permalink / raw)
  To: meta-arm

Using a custom logging.yml we can instruct BitBake's logger to write all
warnings and errors into a separate log file.

Then after the build has finished we can see if the log file is empty and if
not show it and abort the build.

Change-Id: Ida835b5c822941fb513dfb1758b4ec195e0050fc
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .gitlab-ci.yml     |  2 ++
 kas/base.yml       |  3 +++
 kas/check-warnings | 18 ++++++++++++++++++
 kas/logging.yml    | 13 +++++++++++++
 4 files changed, 36 insertions(+)
 create mode 100755 kas/check-warnings
 create mode 100644 kas/logging.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d771a27..1acb7e2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,6 +15,7 @@ stages:
     KAS_WORK_DIR: $CI_PROJECT_DIR/work
     SSTATE_DIR: $CI_BUILDS_DIR/persist/sstate
     DL_DIR: $CI_BUILDS_DIR/persist/downloads
+    BB_LOGCONFIG: $CI_PROJECT_DIR/kas/logging.yml
   before_script:
     - echo KAS_WORK_DIR = $KAS_WORK_DIR
     - echo SSTATE_DIR = $SSTATE_DIR
@@ -28,6 +29,7 @@ stages:
   - KASFILES=$(kas/jobs-to-kas $CI_JOB_NAME)
   - kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
   - kas build $KASFILES
+  - ./kas/check-warnings $KAS_WORK_DIR/build/warnings.log
 
 
 #
diff --git a/kas/base.yml b/kas/base.yml
index 0035a54..03ae7f6 100644
--- a/kas/base.yml
+++ b/kas/base.yml
@@ -25,6 +25,9 @@ repos:
     layers:
       meta-oe:
 
+env:
+  BB_LOGCONFIG: ""
+
 local_conf_header:
   base: |
     CONF_VERSION = "1"
diff --git a/kas/check-warnings b/kas/check-warnings
new file mode 100755
index 0000000..cc39642
--- /dev/null
+++ b/kas/check-warnings
@@ -0,0 +1,18 @@
+#! /bin/bash
+
+# Expects the path to a log file as $1, and if this file has any content
+# then display the contents and exit with an error code.
+
+set -e -u
+
+LOGFILE=$1
+
+if test -s $LOGFILE; then
+    echo ==============================
+    echo The build had warnings/errors:
+    echo ==============================
+    cat $LOGFILE
+    exit 1
+fi
+
+exit 0
diff --git a/kas/logging.yml b/kas/logging.yml
new file mode 100644
index 0000000..3af1029
--- /dev/null
+++ b/kas/logging.yml
@@ -0,0 +1,13 @@
+# Python logging configuration to write all warnings to a separate file
+version: 1
+
+handlers:
+  warnings:
+    class: logging.FileHandler
+    level: WARNING
+    filename: warnings.log
+    formatter: BitBake.logfileFormatter
+
+loggers:
+  BitBake:
+    handlers: [warnings]
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-17 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 15:27 [PATCH][dunfell 1/3] kas: now that linux-stable is unused, remove it from kas Ross Burton
2020-12-17 15:27 ` [PATCH][dunfell 2/3] ci: make bootstrap just another kas overlay Ross Burton
2020-12-17 15:27 ` [PATCH][dunfell 3/3] ci: fail any build that emits warnings Ross Burton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.