Ilya, Tim,

we occasionally come across build issues in the CI on less common OSes,
and I found a few times that we would benefit from seeing the platform
definitions to help figure how to best deal with the problem. I came
across the following patch which emits the output of the platform
definitions just before starting the build, so that we can now compare
platforms. E.g:

  
https://github.com/haproxy/haproxy/runs/4335260115?check_suite_focus=true#step:9:1

Do you have any objection against this being merged ? Would you prefer
to change it a bit (e.g. delimit the output one way or another) ? I'm
open to suggestions, knowing that in its current raw form it did the
job for me, so the rest is cometic.

Thanks,
Willy


>From 02b1e379dce2120b518605fa2164c2e9c358d3ae Mon Sep 17 00:00:00 2001
From: Willy Tarreau <w...@1wt.eu>
Date: Fri, 26 Nov 2021 15:45:41 +0100
Subject: CI: github actions: add the output of $CC -dM -E-

Sometimes figuring what differs between platforms is useful to fix
build issues, to decide what ifdef to add for example. Let's always
call $CC -dM -E- before starting make.
---
 .github/workflows/vtest.yml   | 2 ++
 .github/workflows/windows.yml | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/.github/workflows/vtest.yml b/.github/workflows/vtest.yml
index 4cdbdce5b..c602bcdda 100644
--- a/.github/workflows/vtest.yml
+++ b/.github/workflows/vtest.yml
@@ -75,6 +75,8 @@ jobs:
       run: make -C addons/wurfl/dummy
     - name: Compile HAProxy with ${{ matrix.CC }}
       run: |
+        # report all platform-specific defines to help fixing build issues
+        echo | ${{ matrix.CC }} -dM -xc -E -
         make -j$(nproc) all \
           ERR=1 \
           TARGET=${{ matrix.TARGET }} \
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index 42bb4e8c9..bdcdac686 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -51,6 +51,8 @@ jobs:
           zlib-devel
     - name: Compile HAProxy with ${{ matrix.CC }}
       run: |
+        # report all platform-specific defines to help fixing build issues
+        echo | ${{ matrix.CC }} -dM -xc -E -
         make -j$(nproc) all \
           ERR=1 \
           TARGET=${{ matrix.TARGET }} \
-- 
2.28.0




Reply via email to