openvpn.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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: 10
  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. - name: workaround high-entropy ASLR
  48. # not needed after either an update to llvm or runner is done
  49. run: sudo sysctl vm.mmap_rnd_bits=28
  50. - if: ${{ matrix.ref != 'master' }}
  51. name: Build and test openvpn with fsanitize
  52. run: |
  53. echo 'extra_c_flags=CC="gcc -fsanitize=address" CFLAGS="-fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
  54. - name: Build and test openvpn
  55. uses: wolfSSL/actions-build-autotools-project@v1
  56. with:
  57. repository: OpenVPN/openvpn
  58. ref: ${{ matrix.ref }}
  59. path: openvpn
  60. configure: >-
  61. --with-crypto-library=wolfssl
  62. WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
  63. WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
  64. ${{ env.extra_c_flags }}
  65. check: true
  66. - name: Confirm OpenVPN built with wolfSSL
  67. working-directory: ./openvpn
  68. run: ldd src/openvpn/openvpn | grep wolfssl