openvpn.yml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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: tar build-dir
  27. run: tar -zcf build-dir.tgz build-dir
  28. - name: Upload built lib
  29. uses: actions/upload-artifact@v4
  30. with:
  31. name: wolf-install-openvpn
  32. path: build-dir.tgz
  33. retention-days: 5
  34. openvpn_check:
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. # List of refs to test
  39. ref: [ release/2.6, v2.6.0, master ]
  40. name: ${{ matrix.ref }}
  41. runs-on: ubuntu-latest
  42. # This should be a safe limit for the tests to run.
  43. timeout-minutes: 10
  44. needs: build_wolfssl
  45. steps:
  46. - name: Download lib
  47. uses: actions/download-artifact@v4
  48. with:
  49. name: wolf-install-openvpn
  50. - name: untar build-dir
  51. run: tar -xf build-dir.tgz
  52. - name: Install dependencies
  53. run: |
  54. sudo apt-get update
  55. sudo apt-get install liblzo2-dev libpam0g-dev liblz4-dev libcap-ng-dev \
  56. linux-libc-dev man2html libcmocka-dev python3-docutils \
  57. libtool automake autoconf libnl-genl-3-dev libnl-genl-3-200
  58. - name: workaround high-entropy ASLR
  59. # not needed after either an update to llvm or runner is done
  60. run: sudo sysctl vm.mmap_rnd_bits=28
  61. - if: ${{ matrix.ref != 'master' }}
  62. name: Build and test openvpn with fsanitize
  63. run: |
  64. echo 'extra_c_flags=CC="gcc -fsanitize=address" CFLAGS="-fno-omit-frame-pointer -O2"' >> $GITHUB_ENV
  65. - name: Build and test openvpn
  66. uses: wolfSSL/actions-build-autotools-project@v1
  67. with:
  68. repository: OpenVPN/openvpn
  69. ref: ${{ matrix.ref }}
  70. path: openvpn
  71. configure: >-
  72. --with-crypto-library=wolfssl
  73. WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl"
  74. WOLFSSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl"
  75. ${{ env.extra_c_flags }}
  76. check: true
  77. - name: Confirm OpenVPN built with wolfSSL
  78. working-directory: ./openvpn
  79. run: ldd src/openvpn/openvpn | grep wolfssl