]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Minor CI improvements (#3980)
authorTerry Burton <tez@terryburton.co.uk>
Sun, 14 Mar 2021 13:09:08 +0000 (13:09 +0000)
committerGitHub <noreply@github.com>
Sun, 14 Mar 2021 13:09:08 +0000 (13:09 +0000)
* Use pragmas not hacks to disable build warnings for homebrew libs

Current libjson-c no longer triggering errors.

talloc.h errors silenced by b65415f985bdb4a823afd5d7e1acac4de4314f0b

* CI package tests: Use Azure-hosted mirrors for better reliability

.github/workflows/ci-deb.yml
.github/workflows/ci.yml
src/modules/rlm_sql/drivers/rlm_sql_cassandra/rlm_sql_cassandra.c

index 6e55481c04137129b6c217ba1826847a67fcb407..944896b27b65b5dbffdd9e831ff2abeca301c11a 100644 (file)
@@ -36,8 +36,11 @@ jobs:
 
     - name: Package manager performance improvements
       run: |
+        sed -i 's/deb.debian.org/debian-archive.trafficmanager.net/' /etc/apt/sources.list
+        sed -i 's/archive.ubuntu.com/azure.archive.ubuntu.com/' /etc/apt/sources.list
         echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/02speedup
         echo 'man-db man-db/auto-update boolean false' | debconf-set-selections
+        apt-get update
 
     #
     #  Required so that the checkout action uses git protocol rather than the GitHub REST API.
@@ -45,7 +48,6 @@ jobs:
     #
     - name: Install recent git
       run: |
-        apt-get update
         apt-get install -y --no-install-recommends git-core ca-certificates
 
     - uses: actions/checkout@v2
@@ -147,12 +149,6 @@ jobs:
 
     steps:
 
-    # For pkill
-    - name: Install procps
-      run: |
-        apt-get update
-        apt-get install -y --no-install-recommends procps
-
     - name: Load DEBs
       uses: actions/download-artifact@v2
       with:
@@ -160,8 +156,16 @@ jobs:
 
     - name: Package manager performance improvements
       run: |
+        sed -i 's/deb.debian.org/debian-archive.trafficmanager.net/' /etc/apt/sources.list
+        sed -i 's/archive.ubuntu.com/azure.archive.ubuntu.com/' /etc/apt/sources.list
         echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/02speedup
         echo 'man-db man-db/auto-update boolean false' | debconf-set-selections
+        apt-get update
+
+    # For pkill
+    - name: Install procps
+      run: |
+        apt-get install -y --no-install-recommends procps
 
     - name: Install DEBs
       run: |
index 5e00ce2ae392c77f9bd27e130741f73699a70847..3daeb7a05201d7c8473a06e40d4446bfb395a397 100644 (file)
@@ -190,25 +190,6 @@ jobs:
         pcre-config --libs-posix --version 2>/dev/null || :
         pcre2-config --libs-posix --version 2>/dev/null || :
 
-    - name: Hacks to silence clang-12 warnings in talloc and json-c (MacOS)
-      if: ${{ runner.os == 'macOS' }}
-      run: |
-        sed -i '' '1i\
-        #pragma clang diagnostic ignored "-Wdocumentation"
-        ' /usr/local/include/talloc.h
-        sed -i '' '1i\
-        #pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
-        ' /usr/local/include/json-c/json_tokener.h
-        sed -i '' '1i\
-        #pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
-        ' /usr/local/include/json-c/arraylist.h
-        sed -i '' '1i\
-        #pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync"
-        ' /usr/local/include/json-c/json_util.h
-        sed -i '' '1i\
-        #pragma clang diagnostic ignored "-Wstrict-prototypes"
-        ' /usr/local/include/cassandra.h
-
     - name: Configure
       run: |
         if $CC -v 2>&1 | grep clang > /dev/null; then
index 5c39f178b3879389f2e4cf8e4cbf9eabbacc2698..8cc494fe03ff9350ab6f4eb4f767990236346f02 100644 (file)
 #include <freeradius-devel/server/base.h>
 #include <freeradius-devel/util/debug.h>
 
+#ifdef HAVE_WDOCUMENTATION
+DIAG_OFF(documentation)
+#endif
+DIAG_OFF(strict-prototypes)  /* Seen with homebrew cassandra-cpp-driver 2.15.3 */
 #include <cassandra.h>
+DIAG_ON(strict-prototypes)
+#ifdef HAVE_WDOCUMENTATION
+DIAG_ON(documentation)
+#endif
 
 #include "rlm_sql.h"