os-check.yml 4.6 KB

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