* [PATCH] CONTRIBUTING: refine steps for running CI tests prior to submission
@ 2025-03-21 8:48 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 0/2] refine steps for running CI " 'Cedric Hombourger' via isar-users
0 siblings, 1 reply; 5+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-03-21 8:48 UTC (permalink / raw)
To: isar-users; +Cc: ubely, Cedric Hombourger
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
CONTRIBUTING.md | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f932417b..06f09aed 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -80,11 +80,16 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
* It's highly suggested to test your patchset before submitting it to the mailing
by launching CI tests scripts. The procedure is described below:
+ ```
git clone https://github.com/siemens/kas
cat > kas.yml <<EOF
header:
version: 12
- build_system: isar
+ build_system: isar
+ defaults:
+ repos:
+ patches:
+ repo: isar
repos:
isar:
url: "http://github.com:/ilbers/isar"
@@ -94,6 +99,7 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
meta-isar:
EOF
kas/kas-container shell kas.yml
+ ```
In kas shell:
@@ -102,13 +108,37 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
|sudo dd of=/etc/apt/trusted.gpg.d/debian-isar.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
http://deb.isar-build.org/debian-isar bookworm-isar main" \
- |sudo /etc/apt/sources.list.d/10-isar_build.list
+ |sudo tee /etc/apt/sources.list.d/10-isar_build.list
sudo apt-get update
- sudo apt-get install avocado
+ sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
cd /work/isar/testsuite
avocado run citest.py -t dev --max-parallel-tasks=1
```
+ Your git-formatpatches may be listed in the `kas.yml` file as illustrated below:
+
+ ```
+ ...
+ repos:
+ isar:
+ url: "http://github.com:/ilbers/isar"
+ refspec: master
+ patches:
+ 0001:
+ path: /work/0001-my-contribution-to-isar.patch
+ layers:
+ meta:
+ meta-isar:
+ ```
+
+ Perform the above steps from a clean directory for your CI run to be as close as
+ possible to the environment that our project maintainers will be using. That
+ directory would contain: *.patch isar/ kas/ kas.yml
+
+ Be also mindful of community-provided resources such as deb.debian.org or
+ snapshot.debian.org and consider using a caching proxy in your setup to
+ reduce traffic as much as possible.
+
Active developers may request from maintainers an account on isar-build.org
to analyze CI logs or to launch their own CI builds there.
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250321084851.1422405-1-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 0/2] refine steps for running CI prior to submission
2025-03-21 8:48 [PATCH] CONTRIBUTING: refine steps for running CI tests prior to submission 'Cedric Hombourger' via isar-users
@ 2025-03-21 11:00 ` 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 1/2] CONTRIBUTING: refine steps for running CI tests " 'Cedric Hombourger' via isar-users
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-03-21 11:00 UTC (permalink / raw)
To: isar-users; +Cc: ubely, Cedric Hombourger
Changes compared to v1:
- introduce ci_setup to reduce the number of manual steps we would
require
Cedric Hombourger (2):
CONTRIBUTING: refine steps for running CI tests prior to submission
ci: add ci_setup script to ease provisioning of the test container
CONTRIBUTING.md | 41 ++++++++++++++++++++++++++++++++---------
scripts/ci_setup.sh | 32 ++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 9 deletions(-)
create mode 100755 scripts/ci_setup.sh
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250321110100.3367400-1-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] CONTRIBUTING: refine steps for running CI tests prior to submission
2025-03-21 11:00 ` [PATCH v2 0/2] refine steps for running CI " 'Cedric Hombourger' via isar-users
@ 2025-03-21 11:00 ` 'Cedric Hombourger' via isar-users
2025-03-21 11:01 ` [PATCH v2 2/2] ci: add ci_setup script to ease provisioning of the test container 'Cedric Hombourger' via isar-users
2025-03-27 10:33 ` [PATCH v2 0/2] refine steps for running CI prior to submission Uladzimir Bely
2 siblings, 0 replies; 5+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-03-21 11:00 UTC (permalink / raw)
To: isar-users; +Cc: ubely, Cedric Hombourger
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
CONTRIBUTING.md | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f932417b..06f09aed 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -80,11 +80,16 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
* It's highly suggested to test your patchset before submitting it to the mailing
by launching CI tests scripts. The procedure is described below:
+ ```
git clone https://github.com/siemens/kas
cat > kas.yml <<EOF
header:
version: 12
- build_system: isar
+ build_system: isar
+ defaults:
+ repos:
+ patches:
+ repo: isar
repos:
isar:
url: "http://github.com:/ilbers/isar"
@@ -94,6 +99,7 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
meta-isar:
EOF
kas/kas-container shell kas.yml
+ ```
In kas shell:
@@ -102,13 +108,37 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
|sudo dd of=/etc/apt/trusted.gpg.d/debian-isar.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
http://deb.isar-build.org/debian-isar bookworm-isar main" \
- |sudo /etc/apt/sources.list.d/10-isar_build.list
+ |sudo tee /etc/apt/sources.list.d/10-isar_build.list
sudo apt-get update
- sudo apt-get install avocado
+ sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
cd /work/isar/testsuite
avocado run citest.py -t dev --max-parallel-tasks=1
```
+ Your git-formatpatches may be listed in the `kas.yml` file as illustrated below:
+
+ ```
+ ...
+ repos:
+ isar:
+ url: "http://github.com:/ilbers/isar"
+ refspec: master
+ patches:
+ 0001:
+ path: /work/0001-my-contribution-to-isar.patch
+ layers:
+ meta:
+ meta-isar:
+ ```
+
+ Perform the above steps from a clean directory for your CI run to be as close as
+ possible to the environment that our project maintainers will be using. That
+ directory would contain: *.patch isar/ kas/ kas.yml
+
+ Be also mindful of community-provided resources such as deb.debian.org or
+ snapshot.debian.org and consider using a caching proxy in your setup to
+ reduce traffic as much as possible.
+
Active developers may request from maintainers an account on isar-build.org
to analyze CI logs or to launch their own CI builds there.
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250321110100.3367400-2-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] ci: add ci_setup script to ease provisioning of the test container
2025-03-21 11:00 ` [PATCH v2 0/2] refine steps for running CI " 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 1/2] CONTRIBUTING: refine steps for running CI tests " 'Cedric Hombourger' via isar-users
@ 2025-03-21 11:01 ` 'Cedric Hombourger' via isar-users
2025-03-27 10:33 ` [PATCH v2 0/2] refine steps for running CI prior to submission Uladzimir Bely
2 siblings, 0 replies; 5+ messages in thread
From: 'Cedric Hombourger' via isar-users @ 2025-03-21 11:01 UTC (permalink / raw)
To: isar-users; +Cc: ubely, Cedric Hombourger
Our CONTRIBUTING guide lists several manual steps to be done prior
to running avocado: introduce a ci_setup script that we will use
as entry-point to the kas container. This will help developers
reproduce the CI environment they should use to validate their
changes prior to submitting them.
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
CONTRIBUTING.md | 9 +--------
scripts/ci_setup.sh | 32 ++++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 8 deletions(-)
create mode 100755 scripts/ci_setup.sh
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 06f09aed..b4fa64ff 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -98,19 +98,12 @@ Plan merges to `master` so that both fit the two-week window; short extensions s
meta:
meta-isar:
EOF
- kas/kas-container shell kas.yml
+ kas/kas-container --entrypoint /work/scripts/ci_setup.sh shell kas.yml
```
In kas shell:
```
- wget -q http://deb.isar-build.org/debian-isar.key -O- |gpg --dearmor \
- |sudo dd of=/etc/apt/trusted.gpg.d/debian-isar.gpg
- echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
- http://deb.isar-build.org/debian-isar bookworm-isar main" \
- |sudo tee /etc/apt/sources.list.d/10-isar_build.list
- sudo apt-get update
- sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
cd /work/isar/testsuite
avocado run citest.py -t dev --max-parallel-tasks=1
```
diff --git a/scripts/ci_setup.sh b/scripts/ci_setup.sh
new file mode 100755
index 00000000..f373d1c0
--- /dev/null
+++ b/scripts/ci_setup.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Script to setup a container for CI builds
+#
+# Cedric Hombourger <cedric.hombourger@siemens.com>
+# Copyright (c) Siemens AG, 2025
+# SPDX-License-Identifier: MIT
+
+gpg_key=/etc/apt/trusted.gpg.d/debian-isar.gpg
+[ -f "${gpg_key}" ] || {
+ wget -q http://deb.isar-build.org/debian-isar.key -O- \
+ | gpg --dearmor \
+ | sudo dd of="${gpg_key}"
+}
+
+list=/etc/apt/sources.list.d/10-isar_build.list
+[ -f "${list}" ] || {
+ echo "deb [signed-by=/etc/apt/trusted.gpg.d/debian-isar.gpg] \
+ http://deb.isar-build.org/debian-isar bookworm-isar main" \
+ | sudo tee /etc/apt/sources.list.d/10-isar_build.list
+}
+
+tools="avocado qemu-system-aarch64 qemu-system-arm qemu-system-i386 qemu-system-x86_64"
+need_install=0
+for tool in ${tools}; do
+ which "${tool}" || need_install=1
+done
+[ "${need_install}" = "0" ] || {
+ sudo apt-get update
+ sudo apt-get install -y avocado qemu-system-arm qemu-system-x86
+}
+
+exec /container-entrypoint ${*}
--
2.39.5
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20250321110100.3367400-3-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/2] refine steps for running CI prior to submission
2025-03-21 11:00 ` [PATCH v2 0/2] refine steps for running CI " 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 1/2] CONTRIBUTING: refine steps for running CI tests " 'Cedric Hombourger' via isar-users
2025-03-21 11:01 ` [PATCH v2 2/2] ci: add ci_setup script to ease provisioning of the test container 'Cedric Hombourger' via isar-users
@ 2025-03-27 10:33 ` Uladzimir Bely
2 siblings, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2025-03-27 10:33 UTC (permalink / raw)
To: Cedric Hombourger, isar-users
On Fri, 2025-03-21 at 12:00 +0100, Cedric Hombourger wrote:
> Changes compared to v1:
> - introduce ci_setup to reduce the number of manual steps we would
> require
>
> Cedric Hombourger (2):
> CONTRIBUTING: refine steps for running CI tests prior to submission
> ci: add ci_setup script to ease provisioning of the test container
>
> CONTRIBUTING.md | 41 ++++++++++++++++++++++++++++++++---------
> scripts/ci_setup.sh | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 64 insertions(+), 9 deletions(-)
> create mode 100755 scripts/ci_setup.sh
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/3fd004cfb2d1df96fd205e29d2418cc9414c78a3.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-03-27 10:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-21 8:48 [PATCH] CONTRIBUTING: refine steps for running CI tests prior to submission 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 0/2] refine steps for running CI " 'Cedric Hombourger' via isar-users
2025-03-21 11:00 ` [PATCH v2 1/2] CONTRIBUTING: refine steps for running CI tests " 'Cedric Hombourger' via isar-users
2025-03-21 11:01 ` [PATCH v2 2/2] ci: add ci_setup script to ease provisioning of the test container 'Cedric Hombourger' via isar-users
2025-03-27 10:33 ` [PATCH v2 0/2] refine steps for running CI prior to submission Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox