2
0

os-check.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. name: Ubuntu-Macos-Windows Tests
  2. on:
  3. workflow_call:
  4. jobs:
  5. make_check:
  6. strategy:
  7. fail-fast: false
  8. matrix:
  9. os: [ ubuntu-latest, macos-latest ]
  10. config: [
  11. # Add new configs here
  12. '',
  13. '--enable-all --enable-asn=template',
  14. '--enable-all --enable-asn=original',
  15. '--enable-harden-tls',
  16. '--enable-tls13 --enable-session-ticket --enable-dtls --enable-dtls13
  17. --enable-opensslextra --enable-sessioncerts
  18. CPPFLAGS=''-DWOLFSSL_DTLS_NO_HVR_ON_RESUME -DHAVE_EXT_CACHE
  19. -DWOLFSSL_TICKET_HAVE_ID -DHAVE_EX_DATA -DSESSION_CACHE_DYNAMIC_MEM'' ',
  20. '--enable-all --enable-secure-renegotiation',
  21. '--enable-all --enable-haproxy --enable-quic',
  22. '--enable-dtls --enable-dtls13 --enable-earlydata
  23. --enable-session-ticket --enable-psk
  24. CPPFLAGS=''-DWOLFSSL_DTLS13_NO_HRR_ON_RESUME'' ',
  25. ]
  26. name: make check
  27. runs-on: ${{ matrix.os }}
  28. # This should be a safe limit for the tests to run.
  29. timeout-minutes: 14
  30. steps:
  31. - name: Build and test wolfSSL
  32. uses: wolfSSL/actions-build-autotools-project@v1
  33. with:
  34. configure: ${{ matrix.config }}
  35. check: true
  36. make_user_settings:
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. os: [ ubuntu-latest, macos-latest ]
  41. user-settings: [
  42. # Add new user_settings.h here
  43. 'examples/configs/user_settings_all.h',
  44. ]
  45. name: make user_setting.h
  46. runs-on: ${{ matrix.os }}
  47. # This should be a safe limit for the tests to run.
  48. timeout-minutes: 14
  49. steps:
  50. - name: Build and test wolfSSL
  51. uses: wolfSSL/actions-build-autotools-project@v1
  52. with:
  53. configure: --enable-usersettings
  54. check: true
  55. user-settings: ${{ matrix.user-settings }}
  56. make_user_settings_testwolfcrypt:
  57. strategy:
  58. fail-fast: false
  59. matrix:
  60. os: [ ubuntu-latest, macos-latest ]
  61. user-settings: [
  62. # Add new user_settings.h here
  63. 'examples/configs/user_settings_min_ecc.h',
  64. 'examples/configs/user_settings_wolfboot_keytools.h',
  65. 'examples/configs/user_settings_wolftpm.h',
  66. 'examples/configs/user_settings_tls12.h',
  67. ]
  68. name: make user_setting.h (testwolfcrypt only)
  69. runs-on: ${{ matrix.os }}
  70. # This should be a safe limit for the tests to run.
  71. timeout-minutes: 14
  72. steps:
  73. - name: Build and test wolfSSL
  74. uses: wolfSSL/actions-build-autotools-project@v1
  75. with:
  76. configure: --enable-usersettings --disable-examples
  77. check: false
  78. user-settings: ${{ matrix.user-settings }}
  79. - name: Run wolfcrypt/test/testwolfcrypt
  80. run: ./wolfcrypt/test/testwolfcrypt
  81. # Has to be dedicated function due to the sed call
  82. make_user_all:
  83. strategy:
  84. fail-fast: false
  85. matrix:
  86. os: [ ubuntu-latest, macos-latest ]
  87. name: make user_setting.h (with sed)
  88. runs-on: ${{ matrix.os }}
  89. # This should be a safe limit for the tests to run.
  90. timeout-minutes: 14
  91. steps:
  92. - uses: actions/checkout@v4
  93. - if: ${{ matrix.os == 'macos-latest' }}
  94. run: brew install automake libtool
  95. - run: ./autogen.sh
  96. - name: user_settings_all.h with compatibility layer
  97. run: |
  98. cp ./examples/configs/user_settings_all.h user_settings.h
  99. sed -i -e "s/if 0/if 1/" user_settings.h
  100. ./configure --enable-usersettings
  101. make
  102. make check
  103. windows_build:
  104. name: Windows Build Test
  105. runs-on: windows-latest
  106. # This should be a safe limit for the tests to run.
  107. timeout-minutes: 6
  108. env:
  109. # Path to the solution file relative to the root of the project.
  110. SOLUTION_FILE_PATH: wolfssl64.sln
  111. # Configuration type to build.
  112. # You can convert this to a build matrix if you need coverage of multiple configuration types.
  113. # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  114. BUILD_CONFIGURATION: Release
  115. BUILD_PLATFORM: x64
  116. steps:
  117. - uses: actions/checkout@v4
  118. - name: Add MSBuild to PATH
  119. uses: microsoft/setup-msbuild@v2
  120. - name: Restore NuGet packages
  121. working-directory: ${{env.GITHUB_WORKSPACE}}
  122. run: nuget restore ${{env.SOLUTION_FILE_PATH}}
  123. - name: Build
  124. working-directory: ${{env.GITHUB_WORKSPACE}}
  125. # Add additional options to the MSBuild command line here (like platform or verbosity level).
  126. # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
  127. run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
  128. - name: Run Test
  129. working-directory: ${{env.GITHUB_WORKSPACE}}
  130. run: Release/x64/testsuite.exe