2023-02-20 16:04:38 +01:00
|
|
|
name: OpenVPN Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
|
|
|
|
jobs:
|
2023-03-28 16:46:53 +02:00
|
|
|
build_wolfssl:
|
|
|
|
name: Build wolfSSL
|
|
|
|
# Just to keep it the same as the testing target
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-21 15:48:17 +02:00
|
|
|
# This should be a safe limit for the tests to run.
|
|
|
|
timeout-minutes: 4
|
2023-03-28 16:46:53 +02:00
|
|
|
steps:
|
|
|
|
- name: Build wolfSSL
|
|
|
|
uses: wolfSSL/actions-build-autotools-project@v1
|
|
|
|
with:
|
|
|
|
path: wolfssl
|
|
|
|
configure: --enable-openvpn
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: Upload built lib
|
2024-02-02 20:14:28 +01:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-03-28 16:46:53 +02:00
|
|
|
with:
|
2023-03-28 17:17:18 +02:00
|
|
|
name: wolf-install-openvpn
|
2023-03-28 16:46:53 +02:00
|
|
|
path: build-dir
|
|
|
|
retention-days: 1
|
|
|
|
|
2023-02-20 16:04:38 +01:00
|
|
|
openvpn_check:
|
|
|
|
strategy:
|
2023-03-13 09:48:37 -04:00
|
|
|
fail-fast: false
|
2023-02-20 16:04:38 +01:00
|
|
|
matrix:
|
|
|
|
# List of refs to test
|
2024-02-08 13:52:32 -05:00
|
|
|
ref: [ release/2.6, v2.6.0 ] # 'master' is currently broken
|
2023-02-20 16:04:38 +01:00
|
|
|
name: ${{ matrix.ref }}
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-21 15:48:17 +02:00
|
|
|
# This should be a safe limit for the tests to run.
|
|
|
|
timeout-minutes: 6
|
2023-03-28 16:46:53 +02:00
|
|
|
needs: build_wolfssl
|
2023-02-20 16:04:38 +01:00
|
|
|
steps:
|
2023-03-28 16:46:53 +02:00
|
|
|
- name: Download lib
|
2024-02-02 20:14:28 +01:00
|
|
|
uses: actions/download-artifact@v4
|
2023-02-20 16:04:38 +01:00
|
|
|
with:
|
2023-03-28 17:17:18 +02:00
|
|
|
name: wolf-install-openvpn
|
2023-03-28 16:46:53 +02:00
|
|
|
path: build-dir
|
2023-02-20 16:04:38 +01:00
|
|
|
|
|
|
|
- name: Install dependencies
|
2023-03-09 21:47:10 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev \
|
|
|
|
linux-libc-dev man2html libcmocka-dev python3-docutils \
|
|
|
|
libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
|
2023-02-20 16:04:38 +01:00
|
|
|
|
2023-03-03 18:38:17 +01:00
|
|
|
- if: ${{ matrix.ref != 'master' }}
|
|
|
|
name: Build and test openvpn with fsanitize
|
2023-03-28 16:46:53 +02:00
|
|
|
run: |
|
|
|
|
echo 'extra_c_flags=CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
|
2023-03-03 18:38:17 +01:00
|
|
|
|
2023-03-28 16:46:53 +02:00
|
|
|
- name: Build and test openvpn
|
2023-03-03 18:38:17 +01:00
|
|
|
uses: wolfSSL/actions-build-autotools-project@v1
|
|
|
|
with:
|
|
|
|
repository: OpenVPN/openvpn
|
|
|
|
ref: ${{ matrix.ref }}
|
|
|
|
path: openvpn
|
|
|
|
configure: >-
|
|
|
|
--with-crypto-library=wolfssl
|
2023-02-20 16:04:38 +01:00
|
|
|
WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
|
|
|
|
WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
|
2023-03-28 16:46:53 +02:00
|
|
|
${{ env.extra_c_flags }}
|
2023-02-20 16:04:38 +01:00
|
|
|
check: true
|
|
|
|
|
2023-03-28 16:46:53 +02:00
|
|
|
- name: Confirm OpenVPN built with wolfSSL
|
|
|
|
working-directory: ./openvpn
|
|
|
|
run: ldd src/openvpn/openvpn | grep wolfssl
|