DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: aconole@redhat.com, Michael Santana <maicolgabriel@hotmail.com>
Subject: [dpdk-dev] [PATCH v2 2/2] ci: enable v21 ABI checks
Date: Fri,  4 Dec 2020 18:36:22 +0100	[thread overview]
Message-ID: <20201204173622.12053-2-david.marchand@redhat.com> (raw)
In-Reply-To: <20201204173622.12053-1-david.marchand@redhat.com>

v21 ABI will be maintained until v21.11.

Let's use the latest released libabigail 1.8.

In GitHub Actions, libabigail binaries and the ABI reference are stored
in two shared caches as all branches can use the same.

While at it, we can reproduce changes from the commit 0b8086ce3fe7
("devtools: remove useless files from ABI reference").
This will save some space in the CI caches.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 .ci/linux-build.sh          |  5 ++++-
 .github/workflows/build.yml | 26 +++++++++++++++++++++++++-
 .travis.yml                 | 27 +++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index ee8d07f865..d2c821adf3 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -86,10 +86,13 @@ if [ "$ABI_CHECKS" = "true" ]; then
     if [ ! -d reference ]; then
         refsrcdir=$(readlink -f $(pwd)/../dpdk-$REF_GIT_TAG)
         git clone --single-branch -b $REF_GIT_TAG $REF_GIT_REPO $refsrcdir
-        meson --werror $OPTS $refsrcdir $refsrcdir/build
+        meson $OPTS -Dexamples= $refsrcdir $refsrcdir/build
         ninja -C $refsrcdir/build
         DESTDIR=$(pwd)/reference ninja -C $refsrcdir/build install
         devtools/gen-abi.sh reference
+        find reference/usr/local -name '*.a' -delete
+        rm -rf reference/usr/local/bin
+        rm -rf reference/usr/local/share
         echo $REF_GIT_TAG > reference/VERSION
     fi
 
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index bef6e52372..05eb59527f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,10 +15,13 @@ jobs:
     runs-on: ${{ matrix.config.os }}
     env:
       AARCH64: ${{ matrix.config.cross == 'aarch64' }}
+      ABI_CHECKS: ${{ contains(matrix.config.checks, 'abi') }}
       BUILD_32BIT: ${{ matrix.config.cross == 'i386' }}
       BUILD_DOCS: ${{ contains(matrix.config.checks, 'doc') }}
       CC: ccache ${{ matrix.config.compiler }}
       DEF_LIB: ${{ matrix.config.library }}
+      LIBABIGAIL_VERSION: libabigail-1.8
+      REF_GIT_TAG: v20.11
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
 
     strategy:
@@ -31,7 +34,7 @@ jobs:
           - os: ubuntu-18.04
             compiler: gcc
             library: shared
-            checks: doc+tests
+            checks: abi+doc+tests
           - os: ubuntu-18.04
             compiler: clang
             library: static
@@ -60,6 +63,10 @@ jobs:
       run: |
         echo -n '::set-output name=ccache::'
         echo 'ccache-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-'$(date -u +%Y-w%W)
+        echo -n '::set-output name=libabigail::'
+        echo 'libabigail-${{ matrix.config.os }}'
+        echo -n '::set-output name=abi::'
+        echo 'abi-${{ matrix.config.os }}-${{ matrix.config.compiler }}-${{ matrix.config.cross }}-${{ env.LIBABIGAIL_VERSION }}-${{ env.REF_GIT_TAG }}'
     - name: Retrieve ccache cache
       uses: actions/cache@v2
       with:
@@ -67,10 +74,27 @@ jobs:
         key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
         restore-keys: |
           ${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
+    - name: Retrieve libabigail cache
+      id: libabigail-cache
+      uses: actions/cache@v2
+      if: env.ABI_CHECKS == 'true'
+      with:
+        path: libabigail
+        key: ${{ steps.get_ref_keys.outputs.libabigail }}
+    - name: Retrieve ABI reference cache
+      uses: actions/cache@v2
+      if: env.ABI_CHECKS == 'true'
+      with:
+        path: reference
+        key: ${{ steps.get_ref_keys.outputs.abi }}
     - name: Install packages
       run: sudo apt install -y ccache libnuma-dev python3-setuptools
         python3-wheel python3-pip ninja-build libbsd-dev libpcap-dev
         libibverbs-dev libcrypto++-dev libfdt-dev libjansson-dev
+    - name: Install libabigail build dependencies if no cache is available
+      if: env.ABI_CHECKS == 'true' && steps.libabigail-cache.outputs.cache-hit != 'true'
+      run: sudo apt install -y autoconf automake libtool pkg-config libxml2-dev
+          libdw-dev
     - name: Install i386 cross compiling packages
       if: env.BUILD_32BIT == 'true'
       run: sudo apt install -y gcc-multilib
diff --git a/.travis.yml b/.travis.yml
index d655e286c3..5aa7ad49f1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,6 +2,9 @@
 language: c
 cache:
   ccache: true
+  directories:
+    - libabigail
+    - reference
 
 dist: bionic
 
@@ -18,6 +21,9 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_libabigail_build_packages: &libabigail_build_packages
+  - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -28,6 +34,11 @@ _doc_packages: &doc_packages
 before_install: ./.ci/${TRAVIS_OS_NAME}-setup.sh
 script: ./.ci/${TRAVIS_OS_NAME}-build.sh
 
+env:
+  global:
+    - LIBABIGAIL_VERSION=libabigail-1.8
+    - REF_GIT_TAG=v20.11
+
 jobs:
   include:
   # x86_64 gcc jobs
@@ -45,6 +56,14 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  - env: DEF_LIB="shared" ABI_CHECKS=true
+    arch: amd64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *required_packages
+          - *libabigail_build_packages
   # x86_64 clang jobs
   - env: DEF_LIB="static"
     arch: amd64
@@ -104,6 +123,14 @@ jobs:
         packages:
           - *required_packages
           - *doc_packages
+  - env: DEF_LIB="shared" ABI_CHECKS=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *required_packages
+          - *libabigail_build_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64
-- 
2.23.0


  reply	other threads:[~2020-12-04 17:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24 21:57 [dpdk-dev] [PATCH] ci: hook to Github Actions David Marchand
2020-11-25 13:44 ` Aaron Conole
2020-11-25 14:31   ` David Marchand
2020-11-26  4:46     ` Honnappa Nagarahalli
2020-11-26  8:06       ` David Marchand
2020-11-26 17:01         ` Honnappa Nagarahalli
2020-12-08 14:08           ` David Marchand
2020-12-04 17:36 ` [dpdk-dev] [PATCH v2 1/2] ci: hook to GitHub Actions David Marchand
2020-12-04 17:36   ` David Marchand [this message]
2020-12-14 14:13     ` [dpdk-dev] [PATCH v2 2/2] ci: enable v21 ABI checks Aaron Conole
2020-12-11 20:07   ` [dpdk-dev] [PATCH v2 1/2] ci: hook to GitHub Actions Ferruh Yigit
2020-12-14 10:44     ` Thomas Monjalon
2020-12-14 14:12   ` Aaron Conole
2020-12-14 16:17   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204173622.12053-2-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=aconole@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maicolgabriel@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).