[v2,2/2] ci: test compilation with debug in GHA
Checks
Commit Message
We often miss compilation issues with -O0 -g.
Switch to debug in GHA for the gcc job.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v1:
- rather than introduce a new job, updated the ABI check job
to build with debug,
---
.ci/linux-build.sh | 8 +++++++-
.github/workflows/build.yml | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
Comments
20/03/2023 13:18, David Marchand:
> We often miss compilation issues with -O0 -g.
> Switch to debug in GHA for the gcc job.
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Series applied, thanks.
@@ -65,6 +65,12 @@ if [ "$RISCV64" = "true" ]; then
cross_file=config/riscv/riscv64_linux_gcc
fi
+buildtype=debugoptimized
+
+if [ "$BUILD_DEBUG" = "true" ]; then
+ buildtype=debug
+fi
+
if [ "$BUILD_DOCS" = "true" ]; then
OPTS="$OPTS -Denable_docs=true"
fi
@@ -85,7 +91,7 @@ fi
OPTS="$OPTS -Dplatform=generic"
OPTS="$OPTS -Ddefault_library=$DEF_LIB"
-OPTS="$OPTS -Dbuildtype=debugoptimized"
+OPTS="$OPTS -Dbuildtype=$buildtype"
OPTS="$OPTS -Dcheck_includes=true"
if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
@@ -18,6 +18,7 @@ jobs:
ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
ASAN: ${{ contains(matrix.config.checks, 'asan') }}
BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
+ BUILD_DEBUG: ${{ contains(matrix.config.checks, 'debug') }}
BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
CC: ccache ${{ matrix.config.compiler }}
DEF_LIB: ${{ matrix.config.library }}
@@ -39,7 +40,7 @@ jobs:
mini: mini
- os: ubuntu-20.04
compiler: gcc
- checks: abi+doc+tests
+ checks: abi+debug+doc+tests
- os: ubuntu-20.04
compiler: clang
checks: asan+doc+tests