tests-windows.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Tests Windows
  2. on:
  3. push:
  4. branches: [ "master" ]
  5. pull_request:
  6. branches: [ "master" ]
  7. env:
  8. wasiVer: 'wasi-sdk-25.0-x86_64-windows'
  9. wasiUrl: 'https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-25.0-x86_64-windows.tar.gz'
  10. jobs:
  11. build:
  12. strategy:
  13. matrix:
  14. configuration: [Release]
  15. runs-on: windows-latest # For a list of available runner types, refer to
  16. # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v4
  20. with:
  21. fetch-depth: 0
  22. submodules: 'recursive'
  23. # Install the .NET Core workload
  24. - name: Install .NET Core
  25. uses: actions/setup-dotnet@v4
  26. with:
  27. dotnet-version: 8.0.x
  28. - name: Install wasi-experimental workload
  29. working-directory: tests
  30. run: dotnet workload install wasi-experimental
  31. - name: Download WASI SDK
  32. run: |
  33. Invoke-WebRequest -Uri "${{ env.wasiUrl }}" -OutFile "${{ env.wasiVer }}.tar.gz"
  34. - name: Unpack WASI SDK
  35. run: |
  36. tar -xzf ${{ env.wasiVer }}.tar.gz
  37. echo "Contents of directory after extraction:"
  38. dir "${{ env.wasiVer }}"
  39. shell: pwsh
  40. - name: Set Environment Path for WASI SDK
  41. run: |
  42. $env:WASI_SDK_PATH = "${{ github.workspace }}\${{ env.wasiVer }}"
  43. echo "WASI_SDK_PATH=$env:WASI_SDK_PATH" >> $env:GITHUB_ENV
  44. shell: pwsh
  45. - name: Verify Environment Path
  46. run: |
  47. Write-Host "Environment path set to: $env:WASI_SDK_PATH"
  48. shell: pwsh
  49. # Execute all unit tests in the solution
  50. - name: Execute unit tests
  51. working-directory: tests
  52. run: dotnet test