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 <dce...@redhat.com>
---
V2:
- Addressed Ales' comments:
  - move the git checkout operations in the yaml file
  - drop changes to build scripts
---
 .github/workflows/test.yml | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 90dc8a6f19..2f4c7f91a8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -70,15 +70,23 @@ 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.
+    - name: checkout OVS
       if: github.event_name == 'schedule'
       uses: actions/checkout@v3
       with:
         repository: 'openvswitch/ovs'
+        fetch-depth: 0
         path: 'ovs'
-        ref: 'master'
+
+    - name: checkout OVS most recent stable branch.
+      if: github.event_name == 'schedule'
+      run: |
+        git checkout \
+          $(git branch -a -l '*branch-*' | sed 's/remotes\/origin\///' | \
+            sort -V | tail -1)
+      working-directory: ovs
 
     - name: update APT cache
       run:  sudo apt update
@@ -156,15 +164,22 @@ 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.
+    - name: checkout OVS
       if: github.event_name == 'schedule'
       uses: actions/checkout@v3
       with:
         repository: 'openvswitch/ovs'
+        fetch-depth: 0
         path: 'ovs'
-        ref: 'master'
+    - name: checkout OVS most recent stable branch.
+      if: github.event_name == 'schedule'
+      run: |
+        git checkout \
+          $(git branch -a -l '*branch-*' | sed 's/remotes\/origin\///' | \
+            sort -V | tail -1)
+      working-directory: ovs
     - name: install dependencies
       run:  brew install automake libtool
     - name: update PATH
-- 
2.31.1

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to