cmake.yml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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-24.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. with:
  22. submodules: true
  23. - name: Install dependencies
  24. if: matrix.os == 'ubuntu-22.04'
  25. run: sudo apt-get update && sudo apt-get -y install libxrandr-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 libfftw3-dev
  26. - name: Install dependencies
  27. if: matrix.os == 'ubuntu-24.04'
  28. run: sudo apt-get update && sudo apt-get -y install libxrandr-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 libmpv2 libpulse-dev libpulse0 libfftw3-dev
  29. - name: Configure CMake
  30. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  31. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  32. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  33. - name: Build
  34. # Build your program with the given configuration
  35. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
  36. build-x11-wayland:
  37. strategy:
  38. matrix:
  39. os: [ubuntu-22.04, ubuntu-24.04]
  40. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  41. # You can convert this to a matrix build if you need cross-platform coverage.
  42. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  43. runs-on: ${{ matrix.os }}
  44. steps:
  45. - uses: actions/checkout@v3
  46. with:
  47. submodules: true
  48. - name: Install dependencies
  49. if: matrix.os == 'ubuntu-22.04'
  50. run: sudo apt-get update && sudo apt-get -y install libxrandr-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 libfftw3-dev wayland-scanner++ wayland-protocols libwayland-dev
  51. - name: Install dependencies
  52. if: matrix.os == 'ubuntu-24.04'
  53. run: sudo apt-get update && sudo apt-get -y install libxrandr-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 libmpv2 libpulse-dev libpulse0 libfftw3-dev wayland-scanner++ wayland-protocols libwayland-dev
  54. - name: Configure CMake
  55. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  56. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  57. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  58. - name: Build
  59. # Build your program with the given configuration
  60. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
  61. build-wayland:
  62. strategy:
  63. matrix:
  64. os: [ubuntu-22.04, ubuntu-24.04]
  65. # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
  66. # You can convert this to a matrix build if you need cross-platform coverage.
  67. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
  68. runs-on: ${{ matrix.os }}
  69. steps:
  70. - uses: actions/checkout@v3
  71. with:
  72. submodules: true
  73. - name: Install dependencies
  74. if: matrix.os == 'ubuntu-22.04'
  75. run: sudo apt-get update && sudo apt-get -y install wayland-scanner++ wayland-protocols libwayland-dev libwayland-egl-backend-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 libfftw3-dev
  76. - name: Install dependencies
  77. if: matrix.os == 'ubuntu-24.04'
  78. run: sudo apt-get update && sudo apt-get -y install wayland-scanner++ wayland-protocols libwayland-dev libwayland-egl-backend-dev libglfw3-dev libglew-dev freeglut3-dev libsdl2-dev liblz4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libglm-dev libmpv-dev mpv libmpv2 libpulse-dev libpulse0 libfftw3-dev
  79. - name: Configure CMake
  80. # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
  81. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
  82. run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  83. - name: Build
  84. # Build your program with the given configuration
  85. run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}