openvpn.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. name: OpenVPN Tests
  2. on:
  3. workflow_call:
  4. jobs:
  5. build_wolfssl:
  6. name: Build wolfSSL
  7. # Just to keep it the same as the testing target
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Build wolfSSL
  11. uses: wolfSSL/actions-build-autotools-project@v1
  12. with:
  13. path: wolfssl
  14. configure: --enable-openvpn
  15. install: true
  16. - name: Upload built lib
  17. uses: actions/upload-artifact@v3
  18. with:
  19. name: wolf-install-openvpn
  20. path: build-dir
  21. retention-days: 1
  22. openvpn_check:
  23. strategy:
  24. fail-fast: false
  25. matrix:
  26. # List of refs to test
  27. ref: [ master, release/2.6, v2.6.0 ]
  28. name: ${{ matrix.ref }}
  29. runs-on: ubuntu-latest
  30. needs: build_wolfssl
  31. steps:
  32. - name: Download lib
  33. uses: actions/download-artifact@v3
  34. with:
  35. name: wolf-install-openvpn
  36. path: build-dir
  37. - name: Install dependencies
  38. run: |
  39. sudo apt-get update
  40. sudo apt-get install liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev \
  41. linux-libc-dev man2html libcmocka-dev python3-docutils \
  42. libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
  43. - if: ${{ matrix.ref != 'master' }}
  44. name: Build and test openvpn with fsanitize
  45. run: |
  46. echo 'extra_c_flags=CFLAGS="-fsanitize=address -fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
  47. - name: Build and test openvpn
  48. uses: wolfSSL/actions-build-autotools-project@v1
  49. with:
  50. repository: OpenVPN/openvpn
  51. ref: ${{ matrix.ref }}
  52. path: openvpn
  53. configure: >-
  54. --with-crypto-library=wolfssl
  55. WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
  56. WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
  57. ${{ env.extra_c_flags }}
  58. check: true
  59. - name: Confirm OpenVPN built with wolfSSL
  60. working-directory: ./openvpn
  61. run: ldd src/openvpn/openvpn | grep wolfssl