cmake.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: CMake
  2. on:
  3. push:
  4. branches: [ "main" ]
  5. pull_request:
  6. branches: [ "main" ]
  7. env:
  8. # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  9. BUILD_TYPE: Release
  10. jobs:
  11. build-x11:
  12. strategy:
  13. matrix:
  14. os: [ubuntu-22.04, ubuntu-20.04]
  15. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  16. # You can convert this to a matrix build if you need cross-platform coverage.
  17. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  18. runs-on: ${{ matrix.os }}
  19. steps:
  20. - uses: actions/checkout@v3
  21. - name: Install dependencies
  22. run: sudo apt-get update && sudo apt-get -y install libxrandr-dev libfreeimage-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0
  23. - name: Configure CMake
  24. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  25. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  26. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  27. - name: Build
  28. # Build your program with the given configuration
  29. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
  30. build-x11-wayland:
  31. strategy:
  32. matrix:
  33. os: [ubuntu-22.04]
  34. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  35. # You can convert this to a matrix build if you need cross-platform coverage.
  36. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  37. runs-on: ${{ matrix.os }}
  38. steps:
  39. - uses: actions/checkout@v3
  40. - name: Install dependencies
  41. run: sudo apt-get update && sudo apt-get -y install libxrandr-dev libfreeimage-dev libxinerama-dev libxcursor-dev libxi-dev libgl-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libxxf86vm-dev libglm-dev libglfw3-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0 wayland-scanner++ wayland-protocols libwayland-dev
  42. - name: Configure CMake
  43. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  44. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  45. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  46. - name: Build
  47. # Build your program with the given configuration
  48. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
  49. build-wayland:
  50. strategy:
  51. matrix:
  52. os: [ubuntu-22.04]
  53. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  54. # You can convert this to a matrix build if you need cross-platform coverage.
  55. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  56. runs-on: ${{ matrix.os }}
  57. steps:
  58. - uses: actions/checkout@v3
  59. - name: Install dependencies
  60. run: sudo apt-get update && sudo apt-get -y install wayland-scanner++ wayland-protocols libwayland-dev libwayland-egl-backend-dev libfreeimage-dev libglfw3-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libglm-dev libmpv-dev mpv libmpv1 libpulse-dev libpulse0
  61. - name: Configure CMake
  62. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  63. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  64. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  65. - name: Build
  66. # Build your program with the given configuration
  67. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}