[v6,6/7] ci: test compiler memcpy
Checks
Commit Message
Add compilation tests for the use_cc_memcpy build option.
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
.ci/linux-build.sh | 5 +++++
.github/workflows/build.yml | 7 +++++++
devtools/test-meson-builds.sh | 4 +++-
3 files changed, 15 insertions(+), 1 deletion(-)
Comments
On Fri, Sep 20, 2024 at 12:36 PM Mattias Rönnblom
<mattias.ronnblom@ericsson.com> wrote:
>
> Add compilation tests for the use_cc_memcpy build option.
>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> ---
> .ci/linux-build.sh | 5 +++++
> .github/workflows/build.yml | 7 +++++++
> devtools/test-meson-builds.sh | 4 +++-
> 3 files changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 15ed51e4c1..a873f83d09 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -98,6 +98,11 @@ if [ "$STDATOMIC" = "true" ]; then
> else
> OPTS="$OPTS -Dcheck_includes=true"
> fi
> +if [ "$CCMEMCPY" = "true" ]; then
> + OPTS="$OPTS -Duse_cc_memcpy=true"
> +else
> + OPTS="$OPTS -Duse_cc_memcpy=true"
> +fi
^^
We only test the true value here.
+ OPTS="$OPTS -Duse_cc_memcpy=$CCMEMCPY"
> if [ "$MINI" = "true" ]; then
> OPTS="$OPTS -Denable_drivers=net/null"
> OPTS="$OPTS -Ddisable_libs=*"
> From: Mattias Rönnblom [mailto:mattias.ronnblom@ericsson.com]
> Sent: Friday, 20 September 2024 12.27
> +if [ "$CCMEMCPY" = "true" ]; then
> + OPTS="$OPTS -Duse_cc_memcpy=true"
> +else
> + OPTS="$OPTS -Duse_cc_memcpy=true"
> +fi
With the bug (only testing true) found by David fixed,
Acked-by: Morten Brørup <mb@smartsharesystems.com>
@@ -98,6 +98,11 @@ if [ "$STDATOMIC" = "true" ]; then
else
OPTS="$OPTS -Dcheck_includes=true"
fi
+if [ "$CCMEMCPY" = "true" ]; then
+ OPTS="$OPTS -Duse_cc_memcpy=true"
+else
+ OPTS="$OPTS -Duse_cc_memcpy=true"
+fi
if [ "$MINI" = "true" ]; then
OPTS="$OPTS -Denable_drivers=net/null"
OPTS="$OPTS -Ddisable_libs=*"
@@ -31,6 +31,7 @@ jobs:
RISCV64: ${{ matrix.config.cross == 'riscv64' }}
RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
STDATOMIC: ${{ contains(matrix.config.checks, 'stdatomic') }}
+ CCMEMCPY: ${{ contains(matrix.config.checks, 'ccmemcpy') }}
strategy:
fail-fast: false
@@ -45,6 +46,12 @@ jobs:
- os: ubuntu-22.04
compiler: clang
checks: stdatomic
+ - os: ubuntu-22.04
+ compiler: gcc
+ checks: ccmemcpy
+ - os: ubuntu-22.04
+ compiler: clang
+ checks: ccmemcpy
- os: ubuntu-22.04
compiler: gcc
checks: debug+doc+examples+tests
@@ -228,12 +228,14 @@ for c in gcc clang ; do
if [ $s = shared ] ; then
abicheck=ABI
stdatomic=-Denable_stdatomic=true
+ ccmemcpy=-Duse_cc_memcpy=true
else
abicheck=skipABI # save time and disk space
stdatomic=-Denable_stdatomic=false
+ ccmemcpy=-Duse_cc_memcpy=false
fi
export CC="$CCACHE $c"
- build build-$c-$s $c $abicheck $stdatomic --default-library=$s
+ build build-$c-$s $c $abicheck $stdatomic $ccmemcpy --default-library=$s
unset CC
done
done