os-check.yml 5.1 KB

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