1
0

hitch.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. name: hitch 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. if: github.repository_owner == 'wolfssl'
  16. # Just to keep it the same as the testing target
  17. runs-on: ubuntu-latest
  18. # This should be a safe limit for the tests to run.
  19. timeout-minutes: 4
  20. steps:
  21. - name: Build wolfSSL
  22. uses: wolfSSL/actions-build-autotools-project@v1
  23. with:
  24. path: wolfssl
  25. configure: --enable-hitch
  26. install: true
  27. - name: tar build-dir
  28. run: tar -zcf build-dir.tgz build-dir
  29. - name: Upload built lib
  30. uses: actions/upload-artifact@v4
  31. with:
  32. name: wolf-install-hitch
  33. path: build-dir.tgz
  34. retention-days: 5
  35. hitch_check:
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. # List of releases to test
  40. include:
  41. - ref: 1.7.3
  42. ignore-tests: >-
  43. test13-r82.sh test15-proxy-v2-npn.sh test39-client-cert-proxy.sh
  44. name: ${{ matrix.ref }}
  45. if: github.repository_owner == 'wolfssl'
  46. runs-on: ubuntu-latest
  47. # This should be a safe limit for the tests to run.
  48. timeout-minutes: 4
  49. needs: build_wolfssl
  50. steps:
  51. - name: Download lib
  52. uses: actions/download-artifact@v4
  53. with:
  54. name: wolf-install-hitch
  55. - name: untar build-dir
  56. run: tar -xf build-dir.tgz
  57. - name: Checkout OSP
  58. uses: actions/checkout@v4
  59. with:
  60. repository: wolfssl/osp
  61. path: osp
  62. - name: Install dependencies
  63. run: |
  64. export DEBIAN_FRONTEND=noninteractive
  65. sudo apt-get update
  66. sudo apt-get install -y libev-dev libssl-dev automake python3-docutils flex bison pkg-config make
  67. - name: Checkout hitch
  68. uses: actions/checkout@v4
  69. with:
  70. repository: varnish/hitch
  71. ref: 1.7.3
  72. path: hitch
  73. # Do this before configuring so that it only detects the updated list of
  74. # tests
  75. - if: ${{ matrix.ignore-tests }}
  76. name: Remove tests that we want to ignore
  77. working-directory: ./hitch/src/tests
  78. run: |
  79. rm ${{ matrix.ignore-tests }}
  80. - name: Configure and build hitch
  81. run: |
  82. cd $GITHUB_WORKSPACE/hitch/
  83. patch -p1 < $GITHUB_WORKSPACE/osp/hitch/hitch_1.7.3.patch
  84. autoreconf -ivf
  85. SSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include/ -I$GITHUB_WORKSPACE/build-dir/include/wolfssl" SSL_LIBS="-L$GITHUB_WORKSPACE/build-dir/lib -lwolfssl" ./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir/ --enable-silent-rules --enable-documentation --enable-warnings --with-lex --with-yacc --prefix=$GITHUB_WORKSPACE/build-dir
  86. make -j$(nproc)
  87. - name: Confirm hitch built with wolfSSL
  88. working-directory: ./hitch
  89. run: |
  90. export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
  91. ldd src/hitch | grep wolfssl
  92. - name: Run hitch tests, skipping ignored tests
  93. working-directory: ./hitch
  94. run: |
  95. export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
  96. make check