On 22 Nov 2024, at 16:03, David Marchand wrote:

> By assuming that OVS maintainers never push changes that breaks
> compilation in GHA (which seems to be the case so far), it seems natural
> to assume that generating the reference for clang analyzer should always
> work.
>
> If generating this reference fails, it is likely due to a change external
> to OVS code, and not due to the series being tested (though this series
> gets flagged with an error in patchwork).
>
> Such a situation is often hit in the dpdk-latest branch when some DPDK
> API change breaks OVS compilation and no OVS fix is merged yet.
>
> Split the clang analyzer check in two jobs:
> - a clang-cache job, responsible for computing a cache key of the
>   reference code and compiling a reference build,
> - a clang-analyzer job, which depends on the former job, responsible for
>   compiling the current patch and comparing the result against the
>   reference,
>
> The cache generation won't be reported as a failure at the OVS build step
> (using continue-on-error:).
> If such a failure happens, the cache-analyzer job is skipped.
>
> Fixes: d662eee09724 ("ci: Add clang-analyze to GitHub actions.")
> Signed-off-by: David Marchand <[email protected]>

This change looks good to me, with the minor exception of the cache stage name. 
It suggests that the cache is for Clang rather than the analyze phase. I 
suggest the following change, which I can apply at commit time if you agree:

--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -332,7 +332,7 @@ jobs:
         name: logs-linux-${{ join(matrix.*, '-') }}
         path: logs.tgz

-  build-clang-cache:
+  build-clang-analyze-cache:
     needs: build-dpdk
     env:
       dependencies: |
@@ -341,7 +341,7 @@ jobs:
       CC:   clang
       DPDK: dpdk
       CLANG_ANALYZE: true
-    name: clang-cache
+    name: clang-analyze-cache
     outputs:
       key: ${{ steps.cache_key.outputs.key }}
       outcome: ${{ steps.build_base.outcome }}
@@ -446,10 +446,10 @@ jobs:
       run:  ./.ci/linux-build.sh

   build-clang-analyze:
-    needs: [build-dpdk, build-clang-cache]
+    needs: [build-dpdk, build-clang-analyze-cache]
     if: >
-        needs.build-clang-cache.outputs.outcome == 'success' ||
-        needs.build-clang-cache.outputs.outcome == 'skipped'
+        needs.build-clang-analyze-cache.outputs.outcome == 'success' ||
+        needs.build-clang-analyze-cache.outputs.outcome == 'skipped'
     env:
       dependencies: |
         automake bc clang-tools libnuma-dev libunbound-dev libunwind-dev \
@@ -474,7 +474,7 @@ jobs:
       uses: actions/cache/restore@v4
       with:
         path: base-clang-analyzer-results
-        key:  ${{ needs.build-clang-cache.outputs.key }}
+        key:  ${{ needs.build-clang-analyze-cache.outputs.key }}

     - name: set up python
       uses: actions/setup-python@v5

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to