windows.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. name: windows
  2. on:
  3. push:
  4. branches:
  5. - master
  6. pull_request:
  7. jobs:
  8. test:
  9. runs-on: windows-latest
  10. name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
  11. env:
  12. CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
  13. strategy:
  14. # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
  15. # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
  16. # In order to prevent overusing too much of that 60 limit, we throttle the
  17. # number of rustfmt jobs that will run concurrently.
  18. max-parallel: 2
  19. fail-fast: false
  20. matrix:
  21. target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
  22. cfg_release_channel: [stable]
  23. steps:
  24. # The Windows runners have autocrlf enabled by default
  25. # which causes failures for some of rustfmt's line-ending sensitive tests
  26. - name: disable git eol translation
  27. run: git config --global core.autocrlf false
  28. - name: checkout
  29. uses: actions/checkout@v2
  30. # Run build
  31. - name: Install Rustup using win.rustup.rs
  32. run: |
  33. # Disable the download progress bar which can cause perf issues
  34. $ProgressPreference = "SilentlyContinue"
  35. Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
  36. .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
  37. del rustup-init.exe
  38. rustup target add ${{ matrix.target }}
  39. shell: powershell
  40. - name: Add mingw64 to path for x86_64-gnu
  41. run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
  42. if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
  43. shell: bash
  44. - name: test
  45. run: |
  46. rustc -Vv
  47. cargo -V
  48. set RUST_BACKTRACE=1
  49. cargo build --features "desktop, ssr, router"
  50. cargo test --features "desktop, ssr, router"
  51. shell: cmd