diff options
author | David Marchand <david.marchand@redhat.com> | 2022-05-06 13:57:36 +0200 |
---|---|---|
committer | David Marchand <david.marchand@redhat.com> | 2022-05-09 09:08:18 +0200 |
commit | 2261dbe944c8fe109ee94c42dd55831f3ca87169 (patch) | |
tree | f0ff51b3be5613dfc4498f18514eec6b460b5278 /.ci | |
parent | 8fd9b631ad57c9c210436681324bab01e6600172 (diff) |
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).
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Diffstat (limited to '.ci')
-rwxr-xr-x | .ci/linux-build.sh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 2dea0c93fa..877243c9c8 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -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" |