os-check.yml 5.0 KB

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