macos.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Macos
  2. run-name: Macos 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: [macos-latest]
  18. arch: [arm64]
  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: prepare software
  26. run: |
  27. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  28. brew update
  29. brew install sdl2 xmake
  30. xmake update
  31. - name: build sdl2-nes
  32. run: |
  33. xrepo update-repo
  34. cd ./sdl/sdl2
  35. xmake -v -y
  36. cp build/macosx/${{ matrix.arch }}/release/nes ../../nes-macos-${{ matrix.arch }}.AppImage
  37. cd ../../
  38. - name: build sdl3-nes
  39. run: |
  40. xrepo update-repo
  41. cd ./sdl/sdl3
  42. xmake -v -y
  43. # cp build/macosx/${{ matrix.arch }}/release/nes ../../nes-macos-${{ matrix.arch }}.AppImage
  44. cd ../../
  45. - uses: actions/upload-artifact@v4
  46. with:
  47. name: nes-macos-${{ matrix.arch }}.AppImage
  48. path: nes-macos-${{ matrix.arch }}.AppImage