windows.yml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: windows
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - packages/**
  8. - examples/**
  9. - src/**
  10. - .github/**
  11. - lib.rs
  12. - Cargo.toml
  13. pull_request:
  14. types: [opened, synchronize, reopened, ready_for_review]
  15. branches:
  16. - master
  17. paths:
  18. - packages/**
  19. - examples/**
  20. - src/**
  21. - .github/**
  22. - lib.rs
  23. - Cargo.toml
  24. jobs:
  25. test:
  26. if: github.event.pull_request.draft == false
  27. runs-on: windows-latest
  28. name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
  29. env:
  30. CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
  31. strategy:
  32. # https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
  33. # There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
  34. # In order to prevent overusing too much of that 60 limit, we throttle the
  35. # number of rustfmt jobs that will run concurrently.
  36. # max-parallel:
  37. # fail-fast: false
  38. matrix:
  39. target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
  40. cfg_release_channel: [stable]
  41. steps:
  42. # The Windows runners have autocrlf enabled by default
  43. # which causes failures for some of rustfmt's line-ending sensitive tests
  44. - name: disable git eol translation
  45. run: git config --global core.autocrlf false
  46. # Run build
  47. - name: Install Rustup using win.rustup.rs
  48. run: |
  49. # Disable the download progress bar which can cause perf issues
  50. $ProgressPreference = "SilentlyContinue"
  51. Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
  52. .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
  53. del rustup-init.exe
  54. rustup target add ${{ matrix.target }}
  55. shell: powershell
  56. - name: Add mingw64 to path for x86_64-gnu
  57. run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
  58. if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
  59. shell: bash
  60. # - name: checkout
  61. # uses: actions/checkout@v3
  62. # with:
  63. # path: C:/dioxus.git
  64. # fetch-depth: 1
  65. # we need to use the C drive as the working directory
  66. - name: Checkout
  67. run: |
  68. mkdir C:/dioxus.git
  69. git clone https://github.com/dioxuslabs/dioxus.git C:/dioxus.git --depth 1
  70. - name: test
  71. working-directory: C:/dioxus.git
  72. run: |
  73. rustc -Vv
  74. cargo -V
  75. set RUST_BACKTRACE=1
  76. cargo build --all --tests --examples
  77. cargo test --all --tests
  78. cargo test --package fermi --release
  79. shell: cmd