[RFC] ci: Add support for Cirrus-CI service to test FreeBSD.

Message ID 20250204160739.1603197-1-aconole@redhat.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series [RFC] ci: Add support for Cirrus-CI service to test FreeBSD. |

Checks

Context Check Description
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS RETEST #1
ci/iol-marvell-Functional success Functional Testing PASS RETEST #1
ci/iol-sample-apps-testing success Testing PASS RETEST #1
ci/iol-broadcom-Performance success Performance Testing PASS RETEST #1
ci/iol-intel-Performance success Performance Testing PASS RETEST #1
ci/iol-intel-Functional success Functional Testing PASS RETEST #1

Commit Message

Aaron Conole Feb. 4, 2025, 4:07 p.m. UTC
This commit adds preliminary support for developer driven FreeBSD testing
via the Cirrus-CI cloud continuous integration system.

NOTE: Currently, this does not successfully execute.  See the following
build result:
  https://cirrus-ci.com/task/5626189961756672

Full Logs:
  https://api.cirrus-ci.com/v1/task/5626189961756672/logs/check.log

The tests themselves may need to be run as root.

Signed-off-by: Aaron Conole <aconole@redhat.com>
---
 .ci/freebsd-build.sh |  5 +++++
 .ci/freebsd-setup.sh |  3 +++
 .cirrus.yml          | 33 +++++++++++++++++++++++++++++++++
 MAINTAINERS          |  1 +
 4 files changed, 42 insertions(+)
 create mode 100755 .ci/freebsd-build.sh
 create mode 100755 .ci/freebsd-setup.sh
 create mode 100644 .cirrus.yml
  

Comments

Patrick Robb Feb. 4, 2025, 5:33 p.m. UTC | #1
On Tue, Feb 4, 2025 at 11:07 AM Aaron Conole <aconole@redhat.com> wrote:

> This commit adds preliminary support for developer driven FreeBSD testing
> via the Cirrus-CI cloud continuous integration system.
>
> NOTE: Currently, this does not successfully execute.  See the following
> build result:
>   https://cirrus-ci.com/task/5626189961756672
>
> Full Logs:
>   https://api.cirrus-ci.com/v1/task/5626189961756672/logs/check.log
>
> The tests themselves may need to be run as root.
>
> Signed-off-by: Aaron Conole <aconole@redhat.com>
> ---
>  .ci/freebsd-build.sh |  5 +++++
>  .ci/freebsd-setup.sh |  3 +++
>  .cirrus.yml          | 33 +++++++++++++++++++++++++++++++++
>  MAINTAINERS          |  1 +
>  4 files changed, 42 insertions(+)
>  create mode 100755 .ci/freebsd-build.sh
>  create mode 100755 .ci/freebsd-setup.sh
>  create mode 100644 .cirrus.yml
>
> diff --git a/.ci/freebsd-build.sh b/.ci/freebsd-build.sh
> new file mode 100755
> index 0000000000..099f9fd448
> --- /dev/null
> +++ b/.ci/freebsd-build.sh
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +
> +cd build
> +ninja
> +meson install
> diff --git a/.ci/freebsd-setup.sh b/.ci/freebsd-setup.sh
> new file mode 100755
> index 0000000000..762a8383c3
> --- /dev/null
> +++ b/.ci/freebsd-setup.sh
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +meson setup build
> diff --git a/.cirrus.yml b/.cirrus.yml
> new file mode 100644
> index 0000000000..727dcb14f4
> --- /dev/null
> +++ b/.cirrus.yml
> @@ -0,0 +1,33 @@
> +freebsd_build_task:
> +
> +  freebsd_instance:
> +    matrix:
> +      image_family: freebsd-15-0-snap
> +      image_family: freebsd-14-2-snap
> +    cpu: 4
> +    memory: 4G
> +
> +  env:
> +    DEPENDENCIES: git gcc wget openssl python3 meson pkgconf
> +    PY_DEPS:      pyelftools
> +    matrix:
> +      COMPILER: gcc
> +      COMPILER: clang
> +
> +  prepare_script:
> +    - sysctl -w kern.coredump=0
> +    - pkg update -f
> +    - pkg install -y ${DEPENDENCIES}
> +        $(pkg search -xq "^py3[0-9]+-(${PY_DEPS})-[0-9]+" | xargs)
> +    - mkdir -p /usr/src
> +    - git clone --depth 1 https://git.freebsd.org/src.git /usr/src
>

Sorry, do you mind explaining why this is needed? And should it be cloning
to main or to the latest LTS tag? I think I am ignorant of what is required
for your build process.


> +
> +  configure_script:
> +    - ./.ci/freebsd-setup.sh
> +
> +  build_script:
> +    - ./.ci/freebsd-build.sh
> +
> +  check_script:
> +    - meson test -C build --suite fast-tests -t 3
>

You might be interested in this thread:
https://bugs.dpdk.org/show_bug.cgi?id=761

See Cody's comment from last April about unit tests being broken on FreeBSD
13.0 and 14.0. My recollection is that there is no volunteer to resolve
these issues currently, which is why we are not targeting unit tests for
FreeBSD at the Community Lab - only build tests.


> +            || { cat ./build/meson-logs/testlog.txt; exit 1; }
> diff --git a/MAINTAINERS b/MAINTAINERS
> index b86cdd266b..ed1df17f3c 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -142,6 +142,7 @@ M: Aaron Conole <aconole@redhat.com>
>  M: Michael Santana <maicolgabriel@hotmail.com>
>  F: .github/workflows/build.yml
>  F: .ci/
> +F: .cirrus.yml
>
>  Driver information
>  M: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> --
> 2.47.1
>
>
Looks like it makes sense overall, thanks.

Reviewed-by: Patrick Robb <probb@iol.unh.edu>
  
Aaron Conole Feb. 5, 2025, 9:20 p.m. UTC | #2
Patrick Robb <probb@iol.unh.edu> writes:

> On Tue, Feb 4, 2025 at 11:07 AM Aaron Conole <aconole@redhat.com> wrote:
>
>  This commit adds preliminary support for developer driven FreeBSD testing
>  via the Cirrus-CI cloud continuous integration system.
>
>  NOTE: Currently, this does not successfully execute.  See the following
>  build result:
>    https://cirrus-ci.com/task/5626189961756672
>
>  Full Logs:
>    https://api.cirrus-ci.com/v1/task/5626189961756672/logs/check.log
>
>  The tests themselves may need to be run as root.
>
>  Signed-off-by: Aaron Conole <aconole@redhat.com>
>  ---
>   .ci/freebsd-build.sh |  5 +++++
>   .ci/freebsd-setup.sh |  3 +++
>   .cirrus.yml          | 33 +++++++++++++++++++++++++++++++++
>   MAINTAINERS          |  1 +
>   4 files changed, 42 insertions(+)
>   create mode 100755 .ci/freebsd-build.sh
>   create mode 100755 .ci/freebsd-setup.sh
>   create mode 100644 .cirrus.yml
>
>  diff --git a/.ci/freebsd-build.sh b/.ci/freebsd-build.sh
>  new file mode 100755
>  index 0000000000..099f9fd448
>  --- /dev/null
>  +++ b/.ci/freebsd-build.sh
>  @@ -0,0 +1,5 @@
>  +#!/bin/sh
>  +
>  +cd build
>  +ninja
>  +meson install
>  diff --git a/.ci/freebsd-setup.sh b/.ci/freebsd-setup.sh
>  new file mode 100755
>  index 0000000000..762a8383c3
>  --- /dev/null
>  +++ b/.ci/freebsd-setup.sh
>  @@ -0,0 +1,3 @@
>  +#!/bin/sh
>  +
>  +meson setup build
>  diff --git a/.cirrus.yml b/.cirrus.yml
>  new file mode 100644
>  index 0000000000..727dcb14f4
>  --- /dev/null
>  +++ b/.cirrus.yml
>  @@ -0,0 +1,33 @@
>  +freebsd_build_task:
>  +
>  +  freebsd_instance:
>  +    matrix:
>  +      image_family: freebsd-15-0-snap
>  +      image_family: freebsd-14-2-snap
>  +    cpu: 4
>  +    memory: 4G
>  +
>  +  env:
>  +    DEPENDENCIES: git gcc wget openssl python3 meson pkgconf
>  +    PY_DEPS:      pyelftools
>  +    matrix:
>  +      COMPILER: gcc
>  +      COMPILER: clang
>  +
>  +  prepare_script:
>  +    - sysctl -w kern.coredump=0
>  +    - pkg update -f
>  +    - pkg install -y ${DEPENDENCIES}
>  +        $(pkg search -xq "^py3[0-9]+-(${PY_DEPS})-[0-9]+" | xargs)
>  +    - mkdir -p /usr/src
>  +    - git clone --depth 1 https://git.freebsd.org/src.git /usr/src
>
> Sorry, do you mind explaining why this is needed? And should it be cloning to main or to the latest LTS tag? I think I am ignorant of what is
> required for your build process.

[1933/1938] Generating kernel/freebsd/contigmem with a custom command
FAILED: kernel/freebsd/contigmem.ko 
/usr/bin/make -f ../kernel/freebsd/BSDmakefile.meson KMOD_OBJDIR=kernel/freebsd KMOD_SRC=../kernel/freebsd/contigmem/contigmem.c KMOD=contigmem 'KMOD_CFLAGS=-I/tmp/cirrus-ci-build/build -I/tmp/cirrus-ci-build/config -include rte_config.h' CC=clang
make: "/usr/share/mk/bsd.sysdir.mk" line 16: Unable to locate the kernel source tree. Set SYSDIR to override.
	in /usr/share/mk/bsd.kmod.mk:4
	in ../kernel/freebsd/BSDmakefile.meson:18

without this, no contigmem support.

>  +
>  +  configure_script:
>  +    - ./.ci/freebsd-setup.sh
>  +
>  +  build_script:
>  +    - ./.ci/freebsd-build.sh
>  +
>  +  check_script:
>  +    - meson test -C build --suite fast-tests -t 3
>
> You might be interested in this thread: https://bugs.dpdk.org/show_bug.cgi?id=761
>
> See Cody's comment from last April about unit tests being broken on FreeBSD 13.0 and 14.0. My recollection is that there is no volunteer to
> resolve these issues currently, which is why we are not targeting unit tests for FreeBSD at the Community Lab - only build tests.

Hrrm... that's an interesting issue.  We probably do need some eyeballs
on the FreeBSD support side.

Thanks for taking a look.

>  +            || { cat ./build/meson-logs/testlog.txt; exit 1; }
>  diff --git a/MAINTAINERS b/MAINTAINERS
>  index b86cdd266b..ed1df17f3c 100644
>  --- a/MAINTAINERS
>  +++ b/MAINTAINERS
>  @@ -142,6 +142,7 @@ M: Aaron Conole <aconole@redhat.com>
>   M: Michael Santana <maicolgabriel@hotmail.com>
>   F: .github/workflows/build.yml
>   F: .ci/
>  +F: .cirrus.yml
>
>   Driver information
>   M: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
>  -- 
>  2.47.1
>
> Looks like it makes sense overall, thanks.
>
> Reviewed-by: Patrick Robb <probb@iol.unh.edu>
  
Patrick Robb Feb. 6, 2025, 8:12 p.m. UTC | #3
Recheck-request: iol-intel-Performance

Triggering a retest due to testbed instability yesterday.
  

Patch

diff --git a/.ci/freebsd-build.sh b/.ci/freebsd-build.sh
new file mode 100755
index 0000000000..099f9fd448
--- /dev/null
+++ b/.ci/freebsd-build.sh
@@ -0,0 +1,5 @@ 
+#!/bin/sh
+
+cd build
+ninja
+meson install
diff --git a/.ci/freebsd-setup.sh b/.ci/freebsd-setup.sh
new file mode 100755
index 0000000000..762a8383c3
--- /dev/null
+++ b/.ci/freebsd-setup.sh
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+meson setup build
diff --git a/.cirrus.yml b/.cirrus.yml
new file mode 100644
index 0000000000..727dcb14f4
--- /dev/null
+++ b/.cirrus.yml
@@ -0,0 +1,33 @@ 
+freebsd_build_task:
+
+  freebsd_instance:
+    matrix:
+      image_family: freebsd-15-0-snap
+      image_family: freebsd-14-2-snap
+    cpu: 4
+    memory: 4G
+
+  env:
+    DEPENDENCIES: git gcc wget openssl python3 meson pkgconf
+    PY_DEPS:      pyelftools
+    matrix:
+      COMPILER: gcc
+      COMPILER: clang
+
+  prepare_script:
+    - sysctl -w kern.coredump=0
+    - pkg update -f
+    - pkg install -y ${DEPENDENCIES}
+        $(pkg search -xq "^py3[0-9]+-(${PY_DEPS})-[0-9]+" | xargs)
+    - mkdir -p /usr/src
+    - git clone --depth 1 https://git.freebsd.org/src.git /usr/src
+
+  configure_script:
+    - ./.ci/freebsd-setup.sh
+
+  build_script:
+    - ./.ci/freebsd-build.sh
+
+  check_script:
+    - meson test -C build --suite fast-tests -t 3
+            || { cat ./build/meson-logs/testlog.txt; exit 1; }
diff --git a/MAINTAINERS b/MAINTAINERS
index b86cdd266b..ed1df17f3c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -142,6 +142,7 @@  M: Aaron Conole <aconole@redhat.com>
 M: Michael Santana <maicolgabriel@hotmail.com>
 F: .github/workflows/build.yml
 F: .ci/
+F: .cirrus.yml
 
 Driver information
 M: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>