From patchwork Fri Aug 5 20:34:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frode Nordahl X-Patchwork-Id: 1664194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=kFBKC61L; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lzy5c4nRgz9s1l for ; Sat, 6 Aug 2022 06:35:16 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C84F341E0C; Fri, 5 Aug 2022 20:35:13 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org C84F341E0C Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=kFBKC61L X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PVulfAlEIint; Fri, 5 Aug 2022 20:35:10 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0E3EC41D25; Fri, 5 Aug 2022 20:35:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0E3EC41D25 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id DBE6EC008D; Fri, 5 Aug 2022 20:35:03 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9FE49C002D for ; Fri, 5 Aug 2022 20:34:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 827274049B for ; Fri, 5 Aug 2022 20:34:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 827274049B Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=kFBKC61L X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0a4Z05hkWtHC for ; Fri, 5 Aug 2022 20:34:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 88A7E40B38 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) by smtp2.osuosl.org (Postfix) with ESMTPS id 88A7E40B38 for ; Fri, 5 Aug 2022 20:34:57 +0000 (UTC) Received: from frode-threadripper.. (ti0189a330-0179.bb.online.no [88.91.31.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPSA id F1AD141714 for ; Fri, 5 Aug 2022 20:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1659731695; bh=4iemD4q00WE2Eb1bQPiteCMjRgEOSWwezjv0ZtKZjRY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kFBKC61LOtbkVC+nWl613tl33rEG84G1M29DYO8FEPBvx4aK7pUjYHBvxK/22pPS8 NhRwxpd8gPAbe/1/QICpKNDg+DNeESVDdphpYRvfYVbk8Q94YFRAB2yMCkvhkR3oft YHpqMRooI1+vz4K3cIu7Z/27gDLyVQCMMuKA/tkFE6eeXvxYs8u7vKP/kOoqKQ4GYK /o/fpn+7BlAKAzCUX/NneGTKfePIi6x5yIuMpT3xkBH4T7eXzYIpZBgn1jRyT0SVDo xZWPpQg8TyLaS984UXanNSm08vsphWsdkW3c83M1wzyH4PW+Dxq1xrpNFu/bhqCa+F Xv7vBabRIByLg== From: Frode Nordahl To: dev@openvswitch.org Date: Fri, 5 Aug 2022 22:34:52 +0200 Message-Id: <20220805203452.3060165-6-frode.nordahl@canonical.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220805203452.3060165-1-frode.nordahl@canonical.com> References: <20220805203452.3060165-1-frode.nordahl@canonical.com> MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn 5/5] ci: Add jobb for building the deb package. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Frode Nordahl --- .ci/linux-build.sh | 33 +++++++++++++++++++++++++ .ci/linux-prepare.sh | 6 +++++ .github/workflows/test.yml | 49 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index dc32564fa..6a2226223 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -69,9 +69,42 @@ if [ "$TESTSUITE" ]; then exit 1 fi fi +elif [ "$DEB_PACKAGE" ]; then + configure_ovn + make debian + + # There is a pending SRU to the Ubuntu Open vSwitch package that allows + # building OVN 22.03.1 and onwards. Let's use the Debian package until + # it arrives. + deb_ovs_pool=http://ftp.debian.org/debian/pool/main/o/openvswitch + wget -O /tmp/openvswitch-source_2.17.2-3_all.deb \ + $deb_ovs_pool/openvswitch-source_2.17.2-3_all.deb + sudo dpkg -i /tmp/openvswitch-source_2.17.2-3_all.deb + + mk-build-deps --install --root-cmd sudo --remove debian/control + dpkg-checkbuilddeps + make debian-deb + packages=$(ls $(pwd)/../*.deb) + deps="" + for pkg in $packages; do + _ifs=$IFS + IFS="," + for dep in $(dpkg-deb -f $pkg Depends); do + dep_name=$(echo "$dep"|awk '{print$1}') + # Don't install internal package inter-dependencies from apt + echo $dep_name | grep -q ovn && continue + deps+=" $dep_name" + done + IFS=$_ifs + done + # install package dependencies from apt + echo $deps | xargs sudo apt -y install + # install the locally built openvswitch packages + sudo dpkg -i $packages else configure_ovn $OPTS make -j4 || { cat config.log; exit 1; } fi + exit 0 diff --git a/.ci/linux-prepare.sh b/.ci/linux-prepare.sh index e0c528479..6d73f1535 100755 --- a/.ci/linux-prepare.sh +++ b/.ci/linux-prepare.sh @@ -2,6 +2,12 @@ set -ev +if [ "$DEB_PACKAGE" ]; then + # We're not using sparse for debian packages, tests are skipped and + # all extra dependencies tracked by mk-build-deps. + exit 0 +fi + # Build and install sparse. # # Explicitly disable sparse support for llvm because some travis diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b7283229..973fb9666 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -169,3 +169,52 @@ jobs: with: name: logs-osx-clang---disable-ssl path: config.log + + build-linux-deb: + env: + deb_dependencies: | + build-essential fakeroot devscripts equivs + DEB_PACKAGE: yes + DEB_HOST_ARCH: amd64 + + name: linux deb + runs-on: ubuntu-22.04 + timeout-minutes: 30 + + strategy: + fail-fast: false + + steps: + - name: checkout self + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: checkout ovn-vif + uses: actions/checkout@v2 + with: + repository: 'ovn-org/ovn-vif' + path: 'ovn-vif' + ref: 'main' + + - name: update PATH + run: | + echo "$HOME/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: update APT cache + run: sudo apt update || true + - name: install dependencies for debian packages + run: sudo apt install -y ${{ env.deb_dependencies }} + + - name: prepare + run: ./.ci/linux-prepare.sh + + - name: build + run: ./.ci/linux-build.sh + + - name: upload deb packages + uses: actions/upload-artifact@v2 + with: + name: deb-packages + path: '/home/runner/work/ovn/*.deb'