main.yml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: Build
  2. on: [push, pull_request]
  3. jobs:
  4. Build:
  5. name: ${{ matrix.platform.name }}
  6. runs-on: ${{ matrix.platform.os }}
  7. defaults:
  8. run:
  9. shell: ${{ matrix.platform.shell }}
  10. strategy:
  11. matrix:
  12. platform:
  13. - { name: Windows (x64), os: windows-latest, shell: pwsh, flags: -A x64 }
  14. - { name: Windows (x86), os: windows-latest, shell: pwsh, flags: -A Win32 }
  15. - { name: Windows (ARM64), os: windows-latest, shell: pwsh, flags: -A ARM64 }
  16. - { name: Windows (mingw32), os: windows-latest, shell: 'msys2 {0}', msystem: mingw32, msys-env: mingw-w64-i686 }
  17. - { name: Windows (mingw64), os: windows-latest, shell: 'msys2 {0}', msystem: mingw64, msys-env: mingw-w64-x86_64 }
  18. - { name: Linux, os: ubuntu-20.04, shell: sh, flags: -GNinja }
  19. - { name: MacOS, os: macos-latest, shell: sh }
  20. steps:
  21. - name: Set up MSYS2
  22. if: matrix.platform.shell == 'msys2 {0}'
  23. uses: msys2/setup-msys2@v2
  24. with:
  25. msystem: ${{ matrix.platform.msystem }}
  26. install: >-
  27. ${{ matrix.platform.msys-env }}-gcc
  28. ${{ matrix.platform.msys-env }}-cmake
  29. ${{ matrix.platform.msys-env }}-ninja
  30. ${{ matrix.platform.msys-env }}-pkg-config
  31. - name: Setup Linux dependencies
  32. if: runner.os == 'Linux'
  33. run: |
  34. sudo apt-get update
  35. sudo apt-get install wayland-protocols \
  36. pkg-config \
  37. ninja-build \
  38. libasound2-dev \
  39. libdbus-1-dev \
  40. libegl1-mesa-dev \
  41. libgl1-mesa-dev \
  42. libgles2-mesa-dev \
  43. libglu1-mesa-dev \
  44. libibus-1.0-dev \
  45. libpulse-dev \
  46. libsdl2-2.0-0 \
  47. libsndio-dev \
  48. libudev-dev \
  49. libwayland-dev \
  50. libwayland-client++0 \
  51. wayland-scanner++ \
  52. libwayland-cursor++0 \
  53. libx11-dev \
  54. libxcursor-dev \
  55. libxext-dev \
  56. libxi-dev \
  57. libxinerama-dev \
  58. libxkbcommon-dev \
  59. libxrandr-dev \
  60. libxss-dev \
  61. libxt-dev \
  62. libxv-dev \
  63. libxxf86vm-dev \
  64. libdrm-dev \
  65. libgbm-dev\
  66. libpulse-dev \
  67. libpango1.0-dev
  68. sudo apt install meson
  69. git clone --depth 1 https://gitlab.gnome.org/jadahl/libdecor.git --branch 0.1.0
  70. cd libdecor
  71. meson build --buildtype release -Ddemo=false -Ddbus=disabled
  72. ninja -C build
  73. sudo meson install -C build
  74. - uses: actions/checkout@v2
  75. - name: Configure CMake
  76. run: cmake -B build -DSDL_TEST=ON ${{ matrix.platform.flags }}
  77. - name: Build
  78. run: cmake --build build/