win-csharp-test.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. name: Windows CSharp Build Test
  2. on:
  3. push:
  4. branches: [ 'master', 'main', 'release/**' ]
  5. pull_request:
  6. branches: [ '*' ]
  7. jobs:
  8. build:
  9. if: github.repository_owner == 'wolfssl'
  10. runs-on: windows-latest
  11. # This should be a safe limit for the tests to run.
  12. timeout-minutes: 6
  13. env:
  14. # Path to the solution file relative to the root of the project.
  15. SOLUTION_FILE_PATH: wolfssl\wrapper\CSharp\wolfSSL_CSharp.sln
  16. # Configuration type to build.
  17. # You can convert this to a build matrix if you need coverage of multiple configuration types.
  18. # https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  19. BUILD_CONFIGURATION: Debug
  20. BUILD_PLATFORM: x64
  21. steps:
  22. - name: Pull wolfssl
  23. uses: actions/checkout@master
  24. with:
  25. repository: wolfssl/wolfssl
  26. path: wolfssl
  27. - name: Create FIPS stub files (autogen)
  28. working-directory: wolfssl
  29. run: |
  30. echo $null >> wolfcrypt\src\fips.c
  31. echo $null >> wolfcrypt\src\fips_test.c
  32. echo $null >> wolfcrypt\src\wolfcrypt_first.c
  33. echo $null >> wolfcrypt\src\wolfcrypt_last.c
  34. - name: Add MSBuild to PATH
  35. uses: microsoft/setup-msbuild@v1
  36. - name: Build
  37. working-directory: ${{env.GITHUB_WORKSPACE}}
  38. # Add additional options to the MSBuild command line here (like platform or verbosity level).
  39. # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
  40. run: msbuild /m /p:PlatformToolset=v142 /p:Platform=${{env.BUILD_PLATFORM}} /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
  41. - name: Run wolfCrypt test
  42. working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
  43. run: ./wolfCrypt-test.exe
  44. - name: Run wolfSSL client/server example
  45. working-directory: ${{env.GITHUB_WORKSPACE}}wolfssl\wrapper\CSharp\Debug\x64\
  46. run: ./wolfSSL-TLS-Server.exe && sleep 1 & ./wolfSSL-TLS-Client.exe