windows.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Windows
  2. run-name: Windows Build
  3. on:
  4. push:
  5. branches: [ "master" ]
  6. paths-ignore:
  7. - '.github/workflows/release.yml'
  8. - 'docs/**'
  9. - 'README.md'
  10. - 'README_zh.md'
  11. pull_request:
  12. branches: [ "master" ]
  13. jobs:
  14. build:
  15. strategy:
  16. matrix:
  17. os: [windows-latest]
  18. arch: [x64]
  19. runs-on: ${{ matrix.os }}
  20. concurrency:
  21. group: ${{ matrix.os }}-${{ matrix.arch }}
  22. cancel-in-progress: true
  23. steps:
  24. - uses: actions/checkout@v4
  25. - name: Set up MSVC
  26. uses: ilammy/msvc-dev-cmd@v1
  27. - name: prepare software
  28. uses: xmake-io/github-action-setup-xmake@v1
  29. with:
  30. xmake-version: latest
  31. - name: build sdl2-nes
  32. run: |
  33. xrepo update-repo
  34. cd ./sdl/sdl2
  35. xmake -v -y
  36. cp build/windows/${{ matrix.arch }}/release/nes.exe ../../nes-windows-${{ matrix.arch }}.exe
  37. cd ../../
  38. - name: build sdl3-nes
  39. run: |
  40. xrepo update-repo
  41. cd ./sdl/sdl3
  42. xmake -v -y
  43. # cp build/windows/${{ matrix.arch }}/release/nes.exe ../../nes-windows-${{ matrix.arch }}.exe
  44. cd ../../
  45. - uses: actions/upload-artifact@v4
  46. with:
  47. name: nes-windows-${{ matrix.arch }}.exe
  48. path: nes-windows-${{ matrix.arch }}.exe