[Openvpn-devel,1/2] Github Actions: Add libreSSL actions

Message ID 20220822184147.281142-1-arne@rfc2549.org
State Accepted
Headers show
Series [Openvpn-devel,1/2] Github Actions: Add libreSSL actions | expand

Commit Message

Arne Schwabe Aug. 22, 2022, 8:41 a.m. UTC
Also we don't officially support it, it is nice to know when we break it.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>
---
 .github/workflows/build.yaml | 63 ++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

Comments

Gert Doering Aug. 22, 2022, 9:16 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Looks reasonable, and more test are always good.  Tested by pushing to
my GH repo, and it builds all green today (no good starting with 
"already broken" when nobody has much interest in working on it)

Your patch has been applied to the master branch.

commit a79f8034cc6797e39615d35bc7c6f601eec2f6ae
Author: Arne Schwabe
Date:   Mon Aug 22 20:41:46 2022 +0200

     Github Actions: Add libreSSL actions

     Signed-off-by: Arne Schwabe <arne@rfc2549.org>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20220822184147.281142-1-arne@rfc2549.org>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg25064.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 f42469af6..dfa3953f0 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -366,3 +366,66 @@  jobs:
         token: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }}
         repository: openvpn/openvpn-build
         event-type: openvpn-commit
+
+  libressl:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-22.04]
+        ssllib: [libressl]
+        build: [ normal, asan ]
+        configureflags: ["--with-openssl-engine=no"]
+        include:
+          - build: asan
+            cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
+            ldflags: -fsanitize=address
+            cc: clang
+          - build: normal
+            cflags: "-O2 -g"
+            ldflags: ""
+            cc: gcc
+
+    name: "${{matrix.cc}} ${{matrix.build}} - ${{matrix.os}} - ${{matrix.ssllib}}"
+    runs-on: ${{matrix.os}}
+    env:
+      CFLAGS: ${{ matrix.cflags }}
+      LDFLAGS: ${{ matrix.ldflags }}
+      CC: ${{matrix.cc}}
+
+    steps:
+      - name: Install dependencies
+        run: sudo apt update && sudo apt install -y liblzo2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docutils libtool automake autoconf pkg-config libcap-ng-dev
+      - name: "libressl: checkout"
+        uses: actions/checkout@v3
+        with:
+          path: libressl
+          repository: libressl-portable/portable
+          ref: v3.5.3
+      - name: "libressl: autogen.sh"
+        run: ./autogen.sh
+        working-directory: libressl
+      - name: "libressl: autoconf"
+        run: autoreconf -fvi
+        working-directory: libressl
+      - name: "libressl: configure"
+        run: ./configure --enable-openvpn
+        working-directory: libressl
+      - name: "libressl: make all"
+        run: make -j3
+        working-directory: libressl
+      - name: "libressl: make install"
+        run: sudo make install
+        working-directory: libressl
+      - name: "ldconfig"
+        run: sudo ldconfig
+      - name: Checkout OpenVPN
+        uses: actions/checkout@v3
+      - name: autoconf
+        run: autoreconf -fvi
+      - name: configure
+        run: ./configure --with-crypto-library=openssl ${{matrix.configureflags}}
+      - name: make all
+        run: make -j3
+      - name: make check
+        run: make check
+