main.yml 2.7 KB

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