From patchwork Tue Nov 16 12:31:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 104396 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 E460AA0C43; Tue, 16 Nov 2021 13:31:33 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B120A40141; Tue, 16 Nov 2021 13:31:33 +0100 (CET) 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 0300040040 for ; Tue, 16 Nov 2021 13:31:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637065891; 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; bh=Jc6xZUDvltQ3Mh+k2JZwlHp7txuP26zI7/GjJydDKps=; b=KvV9WEU4ZL5Fun0TMLfMiP8gOWl7Mh8iOiQk4gKKGIUucn+5RYOffizuYqVhUOJHSa6thI 4gNRHmX1VViFiVxv/NgS0Me9s65MkYU/dzwKkvCBUfm5+UynGAEZDzWXQYcgo+QJlNlMlu M8ccuxWILIt6qPLy425KLOjzPetT5MI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-176-ZpOBQZb0M22hP_YJyahFjQ-1; Tue, 16 Nov 2021 07:31:28 -0500 X-MC-Unique: ZpOBQZb0M22hP_YJyahFjQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 12F7D8A2A29; Tue, 16 Nov 2021 12:31:14 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13607B2A78; Tue, 16 Nov 2021 12:31:11 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, Aaron Conole , Michael Santana Subject: [PATCH] ci: add Fedora 35 container in GHA Date: Tue, 16 Nov 2021 13:31:02 +0100 Message-Id: <20211116123102.19237-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com 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 Build DPDK with Fedora 35 containers. Differences with the Ubuntu GHA vm images: - tasks are run as root in containers, no need for sudo, - compiler must be explicitly installed: clang is not in container images, - GHA artifacts can't contain a ':' in their name, and must be filtered, Signed-off-by: David Marchand Acked-by: Aaron Conole --- .ci/linux-build.sh | 3 ++ .ci/linux-setup.sh | 3 ++ .github/workflows/build.yml | 67 +++++++++++++++++++++++++++++++++++-- 3 files changed, 71 insertions(+), 2 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index ef0bd099be..e34a74ab64 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -1,5 +1,8 @@ #!/bin/sh -xe +# Builds are run as root in containers, no need for sudo +[ "$(id -u)" != '0' ] || alias sudo= + on_error() { if [ $? = 0 ]; then exit diff --git a/.ci/linux-setup.sh b/.ci/linux-setup.sh index ca35b4b38d..f5ef6b1b98 100755 --- a/.ci/linux-setup.sh +++ b/.ci/linux-setup.sh @@ -1,5 +1,8 @@ #!/bin/sh -xe +# Builds are run as root in containers, no need for sudo +[ "$(id -u)" != '0' ] || alias sudo= + # need to install as 'root' since some of the unit tests won't run without it sudo python3 -m pip install --upgrade 'meson==0.49.2' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4151cafee7..8429ffb721 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ defaults: shell: bash --noprofile --norc -exo pipefail {0} jobs: - build: + ubuntu-vms: name: ${{ join(matrix.config.*, '-') }} runs-on: ${{ matrix.config.os }} env: @@ -140,7 +140,70 @@ jobs: with: name: meson-logs-${{ join(matrix.config.*, '-') }} path: | + build/.ninja_log + build/gdb.log + build/meson-logs/meson-log.txt build/meson-logs/testlog.txt + + rpm-containers: + name: ${{ join(matrix.config.*, '-') }} + runs-on: ubuntu-latest + container: + image: ${{ matrix.config.image }} + env: + CC: ccache ${{ matrix.config.compiler }} + DEF_LIB: ${{ matrix.config.library }} + + strategy: + fail-fast: false + matrix: + config: + - image: fedora:35 + compiler: gcc + library: static + - image: fedora:35 + compiler: gcc + library: shared + - image: fedora:35 + compiler: clang + library: static + - image: fedora:35 + compiler: clang + library: shared + + steps: + - name: Checkout sources + uses: actions/checkout@v2 + - name: Generate various keys + id: get_keys + run: | + echo -n '::set-output name=ccache::' + echo 'ccache-${{ matrix.config.image }}-${{ matrix.config.compiler }}-'$(date -u +%Y-w%W) + echo -n '::set-output name=logs::' + echo 'meson-logs-${{ join(matrix.config.*, '-') }}' | tr -d ':' + - name: Retrieve ccache cache + uses: actions/cache@v2 + with: + path: ~/.ccache + key: ${{ steps.get_keys.outputs.ccache }}-${{ github.ref }} + restore-keys: | + ${{ steps.get_keys.outputs.ccache }}-refs/heads/main + - name: Update + run: dnf update -y || true + - name: Install packages + run: dnf install -y ccache numactl-devel python3-setuptools + python3-wheel python3-pip python3-pyelftools ninja-build + libatomic libbpf-devel libfdt-devel libpcap-devel openssl-devel + rdma-core-devel zlib-devel ${{ matrix.config.compiler }} + - name: Run setup + run: .ci/linux-setup.sh + - name: Build + run: .ci/linux-build.sh + - name: Upload logs on failure + if: failure() + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.get_keys.outputs.logs }} + path: | build/.ninja_log build/meson-logs/meson-log.txt - build/gdb.log