linux.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. name: linux
  2. run-name: Linux 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: [ubuntu-latest]
  18. arch: [x86_64]
  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. sudo add-apt-repository ppa:xmake-io/xmake -y
  28. # sudo dpkg --add-architecture i386
  29. sudo apt-get update -y
  30. # sudo apt-get install -y lib32z1 libc6:i386 libgcc1:i386 libstdc++5:i386 libstdc++6:i386
  31. sudo apt-get install -y git make gcc p7zip-full libsdl2-dev xmake
  32. sudo apt-get upgrade -y
  33. xmake update
  34. - name: build sdl2-nes
  35. run: |
  36. xrepo update-repo
  37. cd ./sdl/sdl2
  38. xmake -v -y
  39. cp build/linux/${{ matrix.arch }}/release/nes ../../nes-linux-${{ matrix.arch }}.bin
  40. cd ../../
  41. - name: build sdl3-nes
  42. run: |
  43. xrepo update-repo
  44. cd ./sdl/sdl3
  45. xmake -v -y
  46. # cp build/linux/${{ matrix.arch }}/release/nes ../../nes-linux-${{ matrix.arch }}.bin
  47. cd ../../
  48. - uses: actions/upload-artifact@v4
  49. with:
  50. name: nes-linux-${{ matrix.arch }}.bin
  51. path: nes-linux-${{ matrix.arch }}.bin