From patchwork Mon Mar 27 15:36:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dumitru Ceara X-Patchwork-Id: 1761775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QkTKo1HX; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PlcR20hhxz1yYh for ; Tue, 28 Mar 2023 02:38:21 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 7E95040BA1; Mon, 27 Mar 2023 15:38:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 7E95040BA1 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QkTKo1HX 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 jIKt5wAUHX-d; Mon, 27 Mar 2023 15:38:17 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 6C51940B9A; Mon, 27 Mar 2023 15:38:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6C51940B9A Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 30A72C007C; Mon, 27 Mar 2023 15:38:16 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id CBBC8C007A for ; Mon, 27 Mar 2023 15:38:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A1D354017C for ; Mon, 27 Mar 2023 15:38:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A1D354017C Authentication-Results: smtp4.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=QkTKo1HX 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 xWS8sqVgcNWA for ; Mon, 27 Mar 2023 15:38:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 32AD54009A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 32AD54009A for ; Mon, 27 Mar 2023 15:38:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679931492; 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=kJQJrW/4XPzg/UbTPoeja1fyGreliD+rqGOJdpz9WM8=; b=QkTKo1HXsKdf0ue7zoh3b7ZX7XeJ1sxf16WelNreP5irzJCtoUdfxmJA9Wx4cyU3KHTy4W TTm3KBzhly/EpscgBluEUwP9b4Eon2cb2ttYKi5Z2PiaHKbHS42ek3L/A5y8JyEct1s5L6 Fv8Bx3Lk7rMNHzXIh7chMPlghrxF3SU= 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-5-eK1b-YybNeKJQlI_QVgkOw-1; Mon, 27 Mar 2023 11:38:10 -0400 X-MC-Unique: eK1b-YybNeKJQlI_QVgkOw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 611AA81705D; Mon, 27 Mar 2023 15:36:30 +0000 (UTC) Received: from dceara.remote.csb (unknown [10.39.194.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 83EE3492C3E; Mon, 27 Mar 2023 15:36:28 +0000 (UTC) From: Dumitru Ceara To: ovs-dev@openvswitch.org Date: Mon, 27 Mar 2023 17:36:23 +0200 Message-Id: <20230327153623.1815197-1-dceara@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: i.maximets@ovn.org Subject: [ovs-dev] [PATCH ovn] ci: Change scheduled jobs to use the latest OVS stable branch. 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" Until now weekly OVN jobs would try to compile against OVS master branch. But that potentially contains changes that break API. For example a recent OVS commit [0] changed the signature of the daemonize_start() function. In order to avoid build failures due to such changes, adapt the weekly OVN CI job to compile against the most recent OVS stable branch commit. Most likely that won't contain changes that break APIs used by OVN. [0] https://github.com/openvswitch/ovs/commit/07cf5810de8da12c700324bc421bde92376abe06 Signed-off-by: Dumitru Ceara --- .ci/linux-build.sh | 6 ++++++ .ci/osx-build.sh | 7 +++++++ .ci/util.sh | 9 +++++++++ .github/workflows/test.yml | 36 +++++++++++++++++++----------------- Makefile.am | 1 + 5 files changed, 42 insertions(+), 17 deletions(-) create mode 100644 .ci/util.sh diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 7dfb5c3171..c843dda80c 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -3,15 +3,21 @@ set -o errexit set -x +. ./.ci/util.sh + ARCH=${ARCH:-"x86_64"} COMMON_CFLAGS="" OVN_CFLAGS="" OPTS="$OPTS --enable-Werror" JOBS=${JOBS:-"-j4"} +OVS_USE_STABLE=${OVS_USE_STABLE:false} function configure_ovs() { pushd ovs + if [ "$OVS_USE_STABLE" = "true" ]; then + checkout_latest_stable_branch + fi ./boot.sh && ./configure CFLAGS="${COMMON_CFLAGS}" $* || \ { cat config.log; exit 1; } make $JOBS || { cat config.log; exit 1; } diff --git a/.ci/osx-build.sh b/.ci/osx-build.sh index 4b78b66dd1..03ffb9287b 100755 --- a/.ci/osx-build.sh +++ b/.ci/osx-build.sh @@ -1,13 +1,20 @@ #!/bin/bash set -o errexit +set -x + +. ./.ci/util.sh CFLAGS="-Werror $CFLAGS" EXTRA_OPTS="" +OVS_USE_STABLE=${OVS_USE_STABLE:false} function configure_ovs() { pushd ovs + if [ "$OVS_USE_STABLE" = "true" ]; then + checkout_latest_stable_branch + fi ./boot.sh && ./configure $* make -j4 || { cat config.log; exit 1; } popd diff --git a/.ci/util.sh b/.ci/util.sh new file mode 100644 index 0000000000..952371dd68 --- /dev/null +++ b/.ci/util.sh @@ -0,0 +1,9 @@ +# Tries to guess the latest stable branch in a git repo and checks it out. +# Assumes the CWD is inside a clone of the repo. It also assumes stable +# branch names follow the "branch-x.y" convention. +function checkout_latest_stable_branch() +{ + local branch=$(git branch -a -l '*branch-*' | \ + sed 's/remotes\/origin\///' | sort -V | tail -1) + git checkout $branch +} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90dc8a6f19..82f916a997 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,13 +19,14 @@ jobs: libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev \ selinux-policy-dev ncat python3-scapy isc-dhcp-server m32_dependecies: gcc-multilib - ARCH: ${{ matrix.cfg.arch }} - CC: ${{ matrix.cfg.compiler }} - LIBS: ${{ matrix.cfg.libs }} - OPTS: ${{ matrix.cfg.opts }} - TESTSUITE: ${{ matrix.cfg.testsuite }} - TEST_RANGE: ${{ matrix.cfg.test_range }} - SANITIZERS: ${{ matrix.cfg.sanitizers }} + ARCH: ${{ matrix.cfg.arch }} + CC: ${{ matrix.cfg.compiler }} + LIBS: ${{ matrix.cfg.libs }} + OPTS: ${{ matrix.cfg.opts }} + TESTSUITE: ${{ matrix.cfg.testsuite }} + TEST_RANGE: ${{ matrix.cfg.test_range }} + SANITIZERS: ${{ matrix.cfg.sanitizers }} + OVS_USE_STABLE: ${{ github.event_name == 'schedule'}} name: linux ${{ join(matrix.cfg.*, ' ') }} runs-on: ubuntu-20.04 @@ -70,15 +71,15 @@ jobs: if: github.event_name == 'schedule' uses: actions/checkout@v3 - # Weekly runs test using OVS master instead of the - # submodule. - - name: checkout OVS master + # Weekly runs test using the tip of the most recent stable OVS branch + # instead of the submodule (OVS_USE_STABLE gets set to "true"). + - name: checkout OVS if: github.event_name == 'schedule' uses: actions/checkout@v3 with: repository: 'openvswitch/ovs' + fetch-depth: 0 path: 'ovs' - ref: 'master' - name: update APT cache run: sudo apt update @@ -137,8 +138,9 @@ jobs: build-osx: env: - CC: clang - OPTS: --disable-ssl + CC: clang + OPTS: --disable-ssl + OVS_USE_STABLE: ${{ github.event_name == 'schedule'}} name: osx clang --disable-ssl runs-on: macos-latest @@ -156,15 +158,15 @@ jobs: - name: checkout without submodule if: github.event_name == 'schedule' uses: actions/checkout@v3 - # Weekly runs test using OVS master instead of the - # submodule. - - name: checkout OVS master + # Weekly runs test using the tip of the most recent stable OVS branch + # instead of the submodule (OVS_USE_STABLE gets set to "true") + - name: checkout OVS if: github.event_name == 'schedule' uses: actions/checkout@v3 with: repository: 'openvswitch/ovs' + fetch-depth: 0 path: 'ovs' - ref: 'master' - name: install dependencies run: brew install automake libtool - name: update PATH diff --git a/Makefile.am b/Makefile.am index 8c60d4a719..2d650fa1ef 100644 --- a/Makefile.am +++ b/Makefile.am @@ -93,6 +93,7 @@ EXTRA_DIST = \ .ci/ovn-kubernetes/Dockerfile \ .ci/ovn-kubernetes/prepare.sh \ .ci/ovn-kubernetes/custom.patch \ + .ci/util.sh \ .github/workflows/test.yml \ .github/workflows/ovn-kubernetes.yml \ boot.sh \