os-check.yml 4.8 KB

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