main.yml 2.9 KB

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