os-check.yml 4.0 KB

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