1
0

main.yml 2.5 KB

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