windows.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. name: Windows
  2. on:
  3. pull_request:
  4. branches:
  5. - dev
  6. jobs:
  7. build:
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. os: [windows-2019, windows-2022]
  12. kind: [static, shared]
  13. arch: [x64, x86, arm64]
  14. runtimes: [MT, MD]
  15. runs-on: ${{ matrix.os }}
  16. concurrency:
  17. group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Windows-${{ matrix.os }}-${{ matrix.kind }}-${{ matrix.arch }}-${{ matrix.runtimes }}
  18. cancel-in-progress: true
  19. steps:
  20. - uses: actions/checkout@v1
  21. - uses: xmake-io/github-action-setup-xmake@v1
  22. with:
  23. xmake-version: branch@master
  24. - name: Configure Pagefile
  25. uses: al-cheb/[email protected]
  26. with:
  27. minimum-size: 8GB
  28. maximum-size: 32GB
  29. disk-root: "D:"
  30. - name: Tests
  31. run: |
  32. git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master xmakesrc
  33. cd xmakesrc/core
  34. xmake
  35. cd ../..
  36. Copy-Item ./xmakesrc/core/build/xmake.exe ./xmakesrc/xmake
  37. Copy-Item ./xmakesrc/scripts/xrepo.bat ./xmakesrc/xmake
  38. Copy-Item ./xmakesrc/scripts/xrepo.ps1 ./xmakesrc/xmake
  39. $Env:XMAKE_MAIN_REPO = "https://github.com/xmake-io/xmake-repo.git"
  40. $Env:XMAKE_PROGRAM_DIR = $(Resolve-Path ./xmakesrc/xmake)
  41. Set-Item -Path Env:Path -Value ($Env:XMAKE_PROGRAM_DIR + ";" + $Env:Path)
  42. xmake --version
  43. if ("${{ matrix.os }}" -eq "windows-2019") {
  44. xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --vs_sdkver=10.0.19041.0 --linkjobs=2
  45. } else {
  46. xmake l ./scripts/test.lua -vD -a ${{ matrix.arch }} -k ${{ matrix.kind }} --runtimes=${{ matrix.runtimes }} --linkjobs=2
  47. }