[Openvpn-devel,v3,20/21] Add macos OpenSSL 3.0 and ASAN builds

Message ID 20211019183127.614175-21-arne@rfc2549.org
State Accepted
Headers show
Series OpenSSL 3.0 improvements for OpenVPN | expand

Commit Message

Arne Schwabe Oct. 19, 2021, 7:31 a.m. UTC
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 .github/workflows/build.yaml | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

Comments

Gert Doering Nov. 10, 2021, 4:53 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Since most of the bits and pieces are in now, and "make check" succeeds
(unless doing t_client tests with BF-CBC), we can reasonably add this
to the build matrix.  No code change, just GH action.

Your patch has been applied to the master branch.

commit 96f27a29cd4c95dadc16f3ba22876742f426d1c2
Author: Arne Schwabe
Date:   Tue Oct 19 20:31:26 2021 +0200

     Add macos OpenSSL 3.0 and ASAN builds

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211019183127.614175-21-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23018.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 514ae66b2..d39ea8bfa 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -168,15 +168,37 @@  jobs:
 
   macos:
     runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        ossl: [ 1.1, 3 ]
+        build: [ normal, asan ]
+        include:
+          - build: asan
+            cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
+            ldflags: -fsanitize=address
+            # Our build system ignores LDFLAGS for plugins
+            configureflags: --disable-plugin-auth-pam  --disable-plugin-down-root 
+          - build: normal
+            cflags: "-O2 -g"
+            ldflags: ""
+            configureflags: ""
+            
+    name: "macOS - OpenSSL ${{matrix.ossl}} - ${{matrix.build}}"
+    env:
+      CFLAGS: ${{ matrix.cflags }}
+      LDFLAGS: ${{ matrix.ldflags }}
+      OPENSSL_CFLAGS: -I/usr/local/opt/openssl@${{matrix.ossl}}/include
+      OPENSSL_LIBS: "-L/usr/local/opt/openssl@${{matrix.ossl}}/lib -lcrypto -lssl" 
     steps:
+      - name: Install dependencies
+        run: brew install openssl@1.1 openssl@3 lzo lz4 man2html cmocka libtool automake autoconf
       - name: Checkout OpenVPN
         uses: actions/checkout@v2
-      - name: Install dependencies
-        run: brew install openssl lzo lz4 man2html cmocka libtool automake autoconf
       - name: autoconf
         run: autoreconf -fvi
       - name: configure
-        run: OPENSSL_CFLAGS=-I/usr/local/opt/openssl@1.1/include  OPENSSL_LIBS="-L/usr/local/opt/openssl@1.1/lib -lcrypto -lssl" ./configure
+        run: ./configure ${{matrix.configureflags}}
       - name: make all
         run: make -j4
       - name: make check