2
0

os-check.yml 5.3 KB

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