Skip to contentSkip to conversation

ci: switch to Ubuntu 20.04

PATCH Superseded David Marchand 3 participants 10 messages Apr 26, 2022 – May 9, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ci: switch to Ubuntu 20.04

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

---
 .ci/linux-build.sh                            |  7 ++----
 .github/workflows/build.yml                   | 22 +++++++++----------
 config/arm/arm64_armv8_linux_clang_ubuntu2004 |  1 +
 .../ppc/ppc64le-power8-linux-gcc-ubuntu2004   |  1 +
 4 files changed, 14 insertions(+), 17 deletions(-)
 create mode 120000 config/arm/arm64_armv8_linux_clang_ubuntu2004
 create mode 120000 config/ppc/ppc64le-power8-linux-gcc-ubuntu2004
.ci/linux-build.sh +2 -5
index 6a937611fa..30119b61ba 100755
@@ -38,18 +38,15 @@ catch_coredump() {
 }
 
 if [ "$AARCH64" = "true" ]; then
-    # Note: common/cnxk is disabled for Ubuntu 18.04
-    # https://bugs.dpdk.org/show_bug.cgi?id=697
-    OPTS="$OPTS -Ddisable_drivers=common/cnxk"
     if [ "${CC%%clang}" != "$CC" ]; then
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu2004"
     else
         OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
     fi
 fi
 
 if [ "$PPC64LE" = "true" ]; then
-    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu1804"
+    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu2004"
 fi
 
 if [ "$BUILD_DOCS" = "true" ]; then
.github/workflows/build.yml +10 -12
index 22daaabb91..812aa7055d 100644
@@ -30,43 +30,41 @@ jobs:
       fail-fast: false
       matrix:
         config:
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             mini: mini
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             checks: abi+doc+tests
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: clang
             library: static
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: clang
             library: shared
             checks: doc+tests
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: i386
-          # Note: common/cnxk is disabled for Ubuntu 18.04
-          # https://bugs.dpdk.org/show_bug.cgi?id=697
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: aarch64
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             cross: aarch64
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: ppc64le
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             cross: ppc64le
config/arm/arm64_armv8_linux_clang_ubuntu2004 new file +1 -0
new file mode 120000
index 0000000000..01f5b7643e
@@ -0,0 +1 @@
+arm64_armv8_linux_clang_ubuntu1804
\ No newline at end of file
config/ppc/ppc64le-power8-linux-gcc-ubuntu2004 new file +1 -0
new file mode 120000
index 0000000000..9d6139a19b
@@ -0,0 +1 @@
+ppc64le-power8-linux-gcc-ubuntu1804
\ No newline at end of file
Signature · 1 line
2.23.0
#1 lore raw

PATCH 2/2 ci: add mingw cross compilation in GHA

Add mingw cross compilation in our public CI so that users with their own github repository have a first level of checks for Windows compilation before submitting to the mailing list.
This does not replace our better checks in other entities of the CI.

Only the helloworld example is compiled (same as what is tested in test-meson-builds.sh).

Note: the mingw cross compilation toolchain (version 5.0) in Ubuntu 18.04 was broken (missing a ENOMSG definition).

---
 .ci/linux-build.sh          | 22 +++++++++++++++++-----
 .github/workflows/build.yml |  8 ++++++++
 2 files changed, 25 insertions(+), 5 deletions(-)
.ci/linux-build.sh +17 -5
index 30119b61ba..06dd20772d 100755
@@ -37,16 +37,26 @@ catch_coredump() {
     return 1
 }
 
+cross_file=
+
 if [ "$AARCH64" = "true" ]; then
     if [ "${CC%%clang}" != "$CC" ]; then
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu2004"
+        cross_file=config/arm/arm64_armv8_linux_clang_ubuntu2004
     else
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
+        cross_file=config/arm/arm64_armv8_linux_gcc
     fi
 fi
 
+if [ "$MINGW" = "true" ]; then
+    cross_file=config/x86/cross-mingw
+fi
+
 if [ "$PPC64LE" = "true" ]; then
-    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu2004"
+    cross_file=config/ppc/ppc64le-power8-linux-gcc-ubuntu2004
+fi
+
+if [ -n "$cross_file" ]; then
+    OPTS="$OPTS --cross-file $cross_file"
 fi
 
 if [ "$BUILD_DOCS" = "true" ]; then
@@ -59,7 +69,9 @@ if [ "$BUILD_32BIT" = "true" ]; then
     export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
 fi
 
-if [ "$DEF_LIB" = "static" ]; then
+if [ "$MINGW" = "true" ]; then
+    OPTS="$OPTS -Dexamples=helloworld"
+elif [ "$DEF_LIB" = "static" ]; then
     OPTS="$OPTS -Dexamples=l2fwd,l3fwd"
 else
     OPTS="$OPTS -Dexamples=all"
@@ -76,7 +88,7 @@ fi
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "true" ] && [ "$PPC64LE" != "true" ]; then
+if [ -z "$cross_file" ]; then
     failed=
     configure_coredump
     devtools/test-null.sh || failed="true"
.github/workflows/build.yml +8 -0
index 812aa7055d..e2f94d786b 100644
@@ -21,6 +21,7 @@ jobs:
       CC: ccache ${{ matrix.config.compiler }}
       DEF_LIB: ${{ matrix.config.library }}
       LIBABIGAIL_VERSION: libabigail-1.8
+      MINGW: ${{ matrix.config.cross == 'mingw' }}
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
       REF_GIT_TAG: v22.03
@@ -52,6 +53,10 @@ jobs:
             compiler: gcc
             library: static
             cross: i386
+          - os: ubuntu-20.04
+            compiler: gcc
+            library: static
+            cross: mingw
           - os: ubuntu-20.04
             compiler: gcc
             library: static
@@ -119,6 +124,9 @@ jobs:
       if: env.AARCH64 == 'true'
       run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
         pkg-config-aarch64-linux-gnu
+    - name: Install mingw cross compiling packages
+      if: env.MINGW == 'true'
+      run: sudo apt install -y mingw-w64 mingw-w64-tools
     - name: Install ppc64le cross compiling packages
       if: env.PPC64LE == 'true'
       run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
Signature · 1 line
2.23.0
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ci: add mingw cross compilation in GHA

Quoted 5 lines · David Marchand

Add mingw cross compilation in our public CI so that users with their own github repository have a first level of checks for Windows compilation before submitting to the mailing list.
This does not replace our better checks in other entities of the CI.

Quoted 8 lines

Only the helloworld example is compiled (same as what is tested in test-meson-builds.sh).

Note: the mingw cross compilation toolchain (version 5.0) in Ubuntu 18.04 was broken (missing a ENOMSG definition).

---

#3 lore raw
In reply to David Marchand
Quoted 18 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, April 26, 2022 3:18 PM
To: [email protected]
Cc: Aaron Conole <[email protected]>; Michael Santana <[email protected]>; Ruifeng Wang <[email protected]>; Jan Viktorin <[email protected]>; Bruce Richardson <[email protected]>; David Christensen <[email protected]>
Subject: [PATCH 1/2] ci: switch to Ubuntu 20.04

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

---

<snip>

config/arm/arm64_armv8_linux_clang_ubuntu2004

Quoted 6 lines
config/arm/arm64_armv8_linux_clang_ubuntu2004 new file +0 -0
new file mode 120000
index 0000000000..01f5b7643e

How about naming it without '2004'?
It is a link to ubuntu1804 crossfile because distribution dependent paths in the file doesn't change. And I believe the consistency will be kept across distribution releases. So we can use a file name without distribution release number for the latest/default Ubuntu environment.
This removes the need for a new crossfile for each Ubuntu LTS release.

Thanks.

Quoted 14 lines
config/arm/arm64_armv8_linux_clang_ubuntu2004 new file +1 -0
@@ -0,0 +1 @@
+arm64_armv8_linux_clang_ubuntu1804
\ No newline at end of file
config/ppc/ppc64le-power8-linux-gcc-ubuntu2004 new file +1 -1
new file mode 120000
index 0000000000..9d6139a19b
@@ -0,0 +1 @@
+ppc64le-power8-linux-gcc-ubuntu1804
\ No newline at end of file
--

2.23.0

#4 lore raw
Quoted 22 lines · Ruifeng Wang
Quoted 19 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Tuesday, April 26, 2022 3:18 PM
To: [email protected]
Cc: Aaron Conole <[email protected]>; Michael Santana <[email protected]>; Ruifeng Wang <[email protected]>; Jan Viktorin <[email protected]>; Bruce Richardson <[email protected]>; David Christensen <[email protected]>
Subject: [PATCH 1/2] ci: switch to Ubuntu 20.04

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

---

<snip>

Quoted 11 lines

config/arm/arm64_armv8_linux_clang_ubuntu2004

Quoted 6 lines
config/arm/arm64_armv8_linux_clang_ubuntu2004 new file +0 -0
new file mode 120000
index 0000000000..01f5b7643e

How about naming it without '2004'?
It is a link to ubuntu1804 crossfile because distribution dependent paths in the file doesn't change. And I believe the consistency will be kept across distribution releases. So we can use a file name without distribution release number for the latest/default Ubuntu environment.
This removes the need for a new crossfile for each Ubuntu LTS release.

I had some concerns about renaming the 1804 file, if someone relied on it. But on the other hand, this is only for cross compiling and I guess people are only using this file through GHA.
If they did use this file out of GHA, it is trivial to switch to the renamed file.

I'll do what you suggested.

Signature · 1 line
David marchand
#6 lore raw

PATCH v2 1/2 ci: switch to Ubuntu 20.04

In reply to David Marchand

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

Note: Ubuntu 18.04 and 20.04 seem to preserve the same paths for the ARM and PPC cross compilation toolchains, so we can use a single configuration file (with the hope, future releases of Ubuntu will do the same).

---
Changes since v1:
- renamed ubuntu cross compilation configs for ARM and PPC,

---
 .ci/linux-build.sh                            |  7 ++----
 .github/workflows/build.yml                   | 22 +++++++++----------
 ...ntu1804 => arm64_armv8_linux_clang_ubuntu} |  0
 ...tu1804 => ppc64le-power8-linux-gcc-ubuntu} |  0
 4 files changed, 12 insertions(+), 17 deletions(-)
 rename config/arm/{arm64_armv8_linux_clang_ubuntu1804 => arm64_armv8_linux_clang_ubuntu} (100%)
 rename config/ppc/{ppc64le-power8-linux-gcc-ubuntu1804 => ppc64le-power8-linux-gcc-ubuntu} (100%)
.ci/linux-build.sh +2 -5
index 774a1441bf..2dea0c93fa 100755
@@ -57,18 +57,15 @@ catch_coredump() {
 }
 
 if [ "$AARCH64" = "true" ]; then
-    # Note: common/cnxk is disabled for Ubuntu 18.04
-    # https://bugs.dpdk.org/show_bug.cgi?id=697
-    OPTS="$OPTS -Ddisable_drivers=common/cnxk"
     if [ "${CC%%clang}" != "$CC" ]; then
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu1804"
+        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu"
     else
         OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
     fi
 fi
 
 if [ "$PPC64LE" = "true" ]; then
-    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu1804"
+    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu"
 fi
 
 if [ "$BUILD_DOCS" = "true" ]; then
.github/workflows/build.yml +10 -12
index 22daaabb91..812aa7055d 100644
@@ -30,43 +30,41 @@ jobs:
       fail-fast: false
       matrix:
         config:
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             mini: mini
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             checks: abi+doc+tests
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: clang
             library: static
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: clang
             library: shared
             checks: doc+tests
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: i386
-          # Note: common/cnxk is disabled for Ubuntu 18.04
-          # https://bugs.dpdk.org/show_bug.cgi?id=697
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: aarch64
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             cross: aarch64
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: static
             cross: ppc64le
-          - os: ubuntu-18.04
+          - os: ubuntu-20.04
             compiler: gcc
             library: shared
             cross: ppc64le
config/arm/arm64_armv8_linux_clang_ubuntu renamed from config/arm/arm64_armv8_linux_clang_ubuntu1804 +0 -0
similarity index 100%
rename from config/arm/arm64_armv8_linux_clang_ubuntu1804
rename to config/arm/arm64_armv8_linux_clang_ubuntu
config/ppc/ppc64le-power8-linux-gcc-ubuntu renamed from config/ppc/ppc64le-power8-linux-gcc-ubuntu1804 +0 -0
similarity index 100%
rename from config/ppc/ppc64le-power8-linux-gcc-ubuntu1804
rename to config/ppc/ppc64le-power8-linux-gcc-ubuntu
Signature · 1 line
2.23.0
#7 lore raw

PATCH v2 2/2 ci: add mingw cross compilation in GHA

Add mingw cross compilation in our public CI so that users with their own github repository have a first level of checks for Windows compilation before submitting to the mailing list.
This does not replace our better checks in other entities of the CI.

Only the helloworld example is compiled (same as what is tested in test-meson-builds.sh).

Note: the mingw cross compilation toolchain (version 5.0) in Ubuntu 18.04 was broken (missing a ENOMSG definition).

---
 .ci/linux-build.sh          | 22 +++++++++++++++++-----
 .github/workflows/build.yml |  8 ++++++++
 2 files changed, 25 insertions(+), 5 deletions(-)
.ci/linux-build.sh +17 -5
index 2dea0c93fa..877243c9c8 100755
@@ -56,16 +56,26 @@ catch_coredump() {
     return 1
 }
 
+cross_file=
+
 if [ "$AARCH64" = "true" ]; then
     if [ "${CC%%clang}" != "$CC" ]; then
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_clang_ubuntu"
+        cross_file=config/arm/arm64_armv8_linux_clang_ubuntu
     else
-        OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
+        cross_file=config/arm/arm64_armv8_linux_gcc
     fi
 fi
 
+if [ "$MINGW" = "true" ]; then
+    cross_file=config/x86/cross-mingw
+fi
+
 if [ "$PPC64LE" = "true" ]; then
-    OPTS="$OPTS --cross-file config/ppc/ppc64le-power8-linux-gcc-ubuntu"
+    cross_file=config/ppc/ppc64le-power8-linux-gcc-ubuntu
+fi
+
+if [ -n "$cross_file" ]; then
+    OPTS="$OPTS --cross-file $cross_file"
 fi
 
 if [ "$BUILD_DOCS" = "true" ]; then
@@ -78,7 +88,9 @@ if [ "$BUILD_32BIT" = "true" ]; then
     export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
 fi
 
-if [ "$DEF_LIB" = "static" ]; then
+if [ "$MINGW" = "true" ]; then
+    OPTS="$OPTS -Dexamples=helloworld"
+elif [ "$DEF_LIB" = "static" ]; then
     OPTS="$OPTS -Dexamples=l2fwd,l3fwd"
 else
     OPTS="$OPTS -Dexamples=all"
@@ -95,7 +107,7 @@ fi
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "true" ] && [ "$PPC64LE" != "true" ]; then
+if [ -z "$cross_file" ]; then
     failed=
     configure_coredump
     devtools/test-null.sh || failed="true"
.github/workflows/build.yml +8 -0
index 812aa7055d..e2f94d786b 100644
@@ -21,6 +21,7 @@ jobs:
       CC: ccache ${{ matrix.config.compiler }}
       DEF_LIB: ${{ matrix.config.library }}
       LIBABIGAIL_VERSION: libabigail-1.8
+      MINGW: ${{ matrix.config.cross == 'mingw' }}
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
       REF_GIT_TAG: v22.03
@@ -52,6 +53,10 @@ jobs:
             compiler: gcc
             library: static
             cross: i386
+          - os: ubuntu-20.04
+            compiler: gcc
+            library: static
+            cross: mingw
           - os: ubuntu-20.04
             compiler: gcc
             library: static
@@ -119,6 +124,9 @@ jobs:
       if: env.AARCH64 == 'true'
       run: sudo apt install -y gcc-aarch64-linux-gnu libc6-dev-arm64-cross
         pkg-config-aarch64-linux-gnu
+    - name: Install mingw cross compiling packages
+      if: env.MINGW == 'true'
+      run: sudo apt install -y mingw-w64 mingw-w64-tools
     - name: Install ppc64le cross compiling packages
       if: env.PPC64LE == 'true'
       run: sudo apt install -y gcc-powerpc64le-linux-gnu libc6-dev-ppc64el-cross
Signature · 1 line
2.23.0
Reviewed-by on v2 1/2
#8 lore raw
In reply to David Marchand
Quoted 32 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, May 6, 2022 7:58 PM
To: [email protected]
Cc: Aaron Conole <[email protected]>; Michael Santana <[email protected]>; Ruifeng Wang <[email protected]>; Jan Viktorin <[email protected]>; Bruce Richardson <[email protected]>; David Christensen <[email protected]>
Subject: [PATCH v2 1/2] ci: switch to Ubuntu 20.04

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

Note: Ubuntu 18.04 and 20.04 seem to preserve the same paths for the ARM and PPC cross compilation toolchains, so we can use a single configuration file (with the hope, future releases of Ubuntu will do the same).

---
Changes since v1:
- renamed ubuntu cross compilation configs for ARM and PPC,

---
 .ci/linux-build.sh                            |  7 ++----
 .github/workflows/build.yml                   | 22 +++++++++----------
 ...ntu1804 => arm64_armv8_linux_clang_ubuntu} |  0
 ...tu1804 => ppc64le-power8-linux-gcc-ubuntu} |  0
 4 files changed, 12 insertions(+), 17 deletions(-)  rename
Quoted 4 lines

config/arm/{arm64_armv8_linux_clang_ubuntu1804 => arm64_armv8_linux_clang_ubuntu} (100%) rename config/ppc/{ppc64le- power8-linux-gcc-ubuntu1804 => ppc64le-power8-linux-gcc-ubuntu} (100%)

author Reviewed-by Ruifeng Wang
#9 lore raw
Quoted 17 lines · Ruifeng Wang
Quoted 17 lines

-----Original Message-----
From: David Marchand <[email protected]>
Sent: Friday, May 6, 2022 7:58 PM
To: [email protected]
Cc: Aaron Conole <[email protected]>; Michael Santana <[email protected]>; Ruifeng Wang <[email protected]>; Jan Viktorin <[email protected]>; Bruce Richardson <[email protected]>; David Christensen <[email protected]>
Subject: [PATCH v2 1/2] ci: switch to Ubuntu 20.04

Ubuntu 18.04 is now rather old.
Besides, other entities in our CI are also testing this distribution.

Switch to a newer Ubuntu release and benefit from more recent tool(chain)s: for example, net/cnxk now builds fine and can be re-enabled.

Quoted 6 lines
Quoted 6 lines

Note: Ubuntu 18.04 and 20.04 seem to preserve the same paths for the ARM and PPC cross compilation toolchains, so we can use a single configuration file (with the hope, future releases of Ubuntu will do the same).

Quoted 3 lines
Quoted 3 lines

---
Changes since v1:
- renamed ubuntu cross compilation configs for ARM and PPC,

I had forgotten to amend the patch with links for the older config files. I fixed it.

Thanks for the reviews, series applied.

Signature · 1 line
David marchand