softhsm.yml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. name: SoftHSMv2 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: 10
  20. steps:
  21. - name: Build wolfSSL
  22. uses: wolfSSL/actions-build-autotools-project@v1
  23. with:
  24. path: wolfssl
  25. configure: --enable-all CFLAGS=-DRSA_MIN_SIZE=1024
  26. install: true
  27. check: false
  28. - name: tar build-dir
  29. run: tar -zcf build-dir.tgz build-dir
  30. - name: Upload built lib
  31. uses: actions/upload-artifact@v4
  32. with:
  33. name: wolf-install-softhsm
  34. path: build-dir.tgz
  35. retention-days: 5
  36. softhsm_check:
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. # List of releases to test
  41. ref: [ 2.6.1 ]
  42. name: ${{ matrix.ref }}
  43. if: github.repository_owner == 'wolfssl'
  44. runs-on: ubuntu-latest
  45. # This should be a safe limit for the tests to run.
  46. timeout-minutes: 20
  47. needs: build_wolfssl
  48. steps:
  49. - name: Install dependencies
  50. run: |
  51. # Don't prompt for anything
  52. export DEBIAN_FRONTEND=noninteractive
  53. sudo apt-get update
  54. sudo apt-get install -y libcppunit-dev
  55. - name: Download lib
  56. uses: actions/download-artifact@v4
  57. with:
  58. name: wolf-install-softhsm
  59. - name: untar build-dir
  60. run: tar -xf build-dir.tgz
  61. - name: Checkout OSP
  62. uses: actions/checkout@v4
  63. with:
  64. repository: wolfssl/osp
  65. path: osp
  66. - name: Checkout SoftHSMv2
  67. uses: actions/checkout@v4
  68. with:
  69. repository: opendnssec/SoftHSMv2
  70. path: softhsm
  71. ref: ${{ matrix.ref }}
  72. # Not using wolfSSL/actions-build-autotools-project@v1 because autogen.sh doesn't work
  73. - name: Build softhsm
  74. working-directory: softhsm
  75. run: |
  76. patch -p1 < $GITHUB_WORKSPACE/osp/softhsm/${{ matrix.ref }}.patch
  77. autoreconf -if
  78. ./configure --with-crypto-backend=wolfssl WOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir
  79. make -j
  80. - name: Test softhsm
  81. working-directory: softhsm
  82. run: make -j check