openvpn.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: OpenVPN Tests
  2. # START OF COMMON SECTION
  3. on:
  4. push:
  5. branches: [ 'master', 'main', 'release/**' ]
  6. pull_request:
  7. branches: [ '*' ]
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. # END OF COMMON SECTION
  12. jobs:
  13. build_wolfssl:
  14. name: Build wolfSSL
  15. # Just to keep it the same as the testing target
  16. runs-on: ubuntu-latest
  17. # This should be a safe limit for the tests to run.
  18. timeout-minutes: 4
  19. steps:
  20. - name: Build wolfSSL
  21. uses: wolfSSL/actions-build-autotools-project@v1
  22. with:
  23. path: wolfssl
  24. configure: --enable-openvpn
  25. install: true
  26. - name: Upload built lib
  27. uses: actions/upload-artifact@v4
  28. with:
  29. name: wolf-install-openvpn
  30. path: build-dir
  31. retention-days: 5
  32. openvpn_check:
  33. strategy:
  34. fail-fast: false
  35. matrix:
  36. # List of refs to test
  37. ref: [ release/2.6, v2.6.0, master ]
  38. name: ${{ matrix.ref }}
  39. runs-on: ubuntu-latest
  40. # This should be a safe limit for the tests to run.
  41. timeout-minutes: 10
  42. needs: build_wolfssl
  43. steps:
  44. - name: Download lib
  45. uses: actions/download-artifact@v4
  46. with:
  47. name: wolf-install-openvpn
  48. path: build-dir
  49. - name: Install dependencies
  50. run: |
  51. sudo apt-get update
  52. sudo apt-get install liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev \
  53. linux-libc-dev man2html libcmocka-dev python3-docutils \
  54. libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
  55. - name: workaround high-entropy ASLR
  56. # not needed after either an update to llvm or runner is done
  57. run: sudo sysctl vm.mmap_rnd_bits=28
  58. - if: ${{ matrix.ref != 'master' }}
  59. name: Build and test openvpn with fsanitize
  60. run: |
  61. echo 'extra_c_flags=CC="gcc -fsanitize=address" CFLAGS="-fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
  62. - name: Build and test openvpn
  63. uses: wolfSSL/actions-build-autotools-project@v1
  64. with:
  65. repository: OpenVPN/openvpn
  66. ref: ${{ matrix.ref }}
  67. path: openvpn
  68. configure: >-
  69. --with-crypto-library=wolfssl
  70. WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
  71. WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
  72. ${{ env.extra_c_flags }}
  73. check: true
  74. - name: Confirm OpenVPN built with wolfSSL
  75. working-directory: ./openvpn
  76. run: ldd src/openvpn/openvpn | grep wolfssl