From patchwork Tue Oct 17 07:15:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 132719 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5388243188; Tue, 17 Oct 2023 09:15:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA50440279; Tue, 17 Oct 2023 09:15:35 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0026440269 for ; Tue, 17 Oct 2023 09:15:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697526933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pYRUevnsx69n7F5sCZLq/e3Fga5IAauEK28D34breGc=; b=PRl1JqrQlAGL4tBOQpkGJgmWGTLpa62TeQtN29WcOzk1VrTwUTjlkYHKsApTgiQA08fO9D SASj7stoXh3x/yEHK+n5So2vdK/h8UoOBr3QWFm0wQQPt+el5iOlsvmU+JfKK6joP0n6fj S7dteSsLbhff5qcV+JP5ikoSyZb5+oM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-356-hs7hKzRPMnWIGDUMeyZWfg-1; Tue, 17 Oct 2023 03:15:30 -0400 X-MC-Unique: hs7hKzRPMnWIGDUMeyZWfg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A196681D9E1; Tue, 17 Oct 2023 07:15:29 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.225.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87704492BEE; Tue, 17 Oct 2023 07:15:28 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Aaron Conole , Michael Santana , Bruce Richardson Subject: [PATCH v2] ci: test stdatomic API Date: Tue, 17 Oct 2023 09:15:18 +0200 Message-ID: <20231017071518.2053577-1-david.marchand@redhat.com> In-Reply-To: <20230929141510.3114938-1-david.marchand@redhat.com> References: <20230929141510.3114938-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add some compilation tests with C11 atomics enabled. The headers check can't be enabled (as gcc and clang don't provide stdatomic before C++23). Signed-off-by: David Marchand Reviewed-by: Aaron Conole --- Changelog from v1: - following Thomas offlist review, tweaked coverage in test-meson-builds.sh to reduce the number of build targets, --- .ci/linux-build.sh | 6 +++++- .github/workflows/build.yml | 8 ++++++++ devtools/test-meson-builds.sh | 4 +++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index e0b62bac90..b09df07b55 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -92,7 +92,11 @@ fi OPTS="$OPTS -Dplatform=generic" OPTS="$OPTS -Ddefault_library=$DEF_LIB" OPTS="$OPTS -Dbuildtype=$buildtype" -OPTS="$OPTS -Dcheck_includes=true" +if [ "$STDATOMIC" = "true" ]; then + OPTS="$OPTS -Denable_stdatomic=true" +else + OPTS="$OPTS -Dcheck_includes=true" +fi if [ "$MINI" = "true" ]; then OPTS="$OPTS -Denable_drivers=net/null" OPTS="$OPTS -Ddisable_libs=*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a2ac0ceee..14328622fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,7 @@ jobs: REF_GIT_TAG: none RISCV64: ${{ matrix.config.cross == 'riscv64' }} RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }} + STDATOMIC: ${{ contains(matrix.config.checks, 'stdatomic') }} strategy: fail-fast: false @@ -38,6 +39,12 @@ jobs: - os: ubuntu-20.04 compiler: gcc mini: mini + - os: ubuntu-20.04 + compiler: gcc + checks: stdatomic + - os: ubuntu-20.04 + compiler: clang + checks: stdatomic - os: ubuntu-20.04 compiler: gcc checks: debug+doc+examples+tests @@ -241,6 +248,7 @@ jobs: > ~/env echo CC=ccache ${{ matrix.config.compiler }} >> ~/env echo DEF_LIB=${{ matrix.config.library }} >> ~/env + echo STDATOMIC=false >> ~/env - name: Load the cached image run: | docker load -i ~/.image/${{ matrix.config.image }}.tar diff --git a/devtools/test-meson-builds.sh b/devtools/test-meson-builds.sh index 605a855999..5c07063cbd 100755 --- a/devtools/test-meson-builds.sh +++ b/devtools/test-meson-builds.sh @@ -227,11 +227,13 @@ for c in gcc clang ; do for s in static shared ; do if [ $s = shared ] ; then abicheck=ABI + stdatomic=-Denable_stdatomic=true else abicheck=skipABI # save time and disk space + stdatomic=-Denable_stdatomic=false fi export CC="$CCACHE $c" - build build-$c-$s $c $abicheck --default-library=$s + build build-$c-$s $c $abicheck $stdatomic --default-library=$s unset CC done done