1
0

os-check.yml 5.8 KB

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