openvpn.yml 2.2 KB

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