windows.yml 2.8 KB

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