Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
5.7KB

  1. name: cmake
  2. on: [push, pull_request]
  3. env:
  4. DESTDIR: ${{ github.workspace }}/build/tmp
  5. jobs:
  6. linux:
  7. strategy:
  8. matrix:
  9. include:
  10. - container: debian:11
  11. - container: debian:12
  12. - container: ubuntu:22.04
  13. - container: ubuntu:24.04
  14. runs-on: ubuntu-latest
  15. container:
  16. image: ${{ matrix.container }}
  17. steps:
  18. - uses: actions/checkout@v4
  19. - name: Set up dependencies
  20. run: |
  21. apt-get update -qq
  22. apt-get install -yqq cmake g++ libfluidsynth-dev liblo-dev libmagic-dev libsndfile1-dev libx11-dev lsb-release pkg-config
  23. echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
  24. - name: configure
  25. run: cmake -S cmake -B build
  26. - name: build
  27. run: cmake --build build -j $(nproc)
  28. - name: install
  29. run: cmake --install build --verbose
  30. - uses: actions/upload-artifact@v4
  31. with:
  32. name: linux-${{ env.PACK_NAME }}
  33. path: ${{ env.DESTDIR }}
  34. macos:
  35. strategy:
  36. matrix:
  37. include:
  38. - frameworks: ON
  39. - frameworks: OFF
  40. runs-on: macos-latest
  41. steps:
  42. - uses: actions/checkout@v4
  43. - name: Set up dependencies
  44. run: |
  45. brew install cmake fluid-synth liblo libmagic libsndfile pkg-config
  46. if [ "${{ matrix.frameworks }}" = "" ]; then
  47. echo "PACK_NAME=frameworks" >> "${GITHUB_ENV}"
  48. else
  49. echo "PACK_NAME=libs" >> "${GITHUB_ENV}"
  50. fi
  51. - name: configure
  52. run: cmake -S cmake -B build -DCARLA_BUILD_FRAMEWORKS=${{ matrix.frameworks }}
  53. - name: build
  54. run: cmake --build build -j $(sysctl -n hw.logicalcpu)
  55. - name: install
  56. run: cmake --install build --verbose
  57. - uses: actions/upload-artifact@v4
  58. with:
  59. name: macos-${{ env.PACK_NAME }}-${{ matrix.frameworks }}
  60. path: ${{ env.DESTDIR }}
  61. mingw32-cross:
  62. strategy:
  63. matrix:
  64. include:
  65. - container: debian:11
  66. - container: debian:12
  67. - container: ubuntu:22.04
  68. - container: ubuntu:24.04
  69. runs-on: ubuntu-latest
  70. container:
  71. image: ${{ matrix.container }}
  72. steps:
  73. - uses: actions/checkout@v4
  74. - name: Set up dependencies
  75. run: |
  76. dpkg --add-architecture i386
  77. apt-get update -qq
  78. apt-get install -yqq cmake binutils-mingw-w64-i686 gcc g++-mingw-w64 lsb-release mingw-w64 pkg-config
  79. if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
  80. apt-get install -yqq wine wine32 wine64
  81. else
  82. apt-get install -yqq wine-stable
  83. fi
  84. echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
  85. - name: configure
  86. env:
  87. PKG_CONFIG: false
  88. run: cmake -S cmake -B build -DCMAKE_CROSSCOMPILING=ON -DCMAKE_CROSSCOMPILING_EMULATOR=wine -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=i686 -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ -DCMAKE_AR=/usr/bin/i686-w64-mingw32-ar -DCMAKE_C_COMPILER_AR=/usr/bin/i686-w64-mingw32-ar -DCMAKE_CXX_COMPILER_AR=/usr/bin/i686-w64-mingw32-ar -DCMAKE_RANLIB=/usr/bin/i686-w64-mingw32-ranlib -DCMAKE_C_COMPILER_RANLIB=/usr/bin/i686-w64-mingw32-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/usr/bin/i686-w64-mingw32-ranlib -DCMAKE_RC_COMPILER=/usr/bin/i686-w64-mingw32-windres
  89. - name: build
  90. run: cmake --build build -j $(nproc)
  91. - name: install
  92. run: cmake --install build --verbose
  93. - uses: actions/upload-artifact@v4
  94. with:
  95. name: mingw32-${{ env.PACK_NAME }}
  96. path: ${{ env.DESTDIR }}
  97. mingw64-cross:
  98. strategy:
  99. matrix:
  100. include:
  101. - container: debian:11
  102. - container: debian:12
  103. - container: ubuntu:22.04
  104. - container: ubuntu:24.04
  105. runs-on: ubuntu-latest
  106. container:
  107. image: ${{ matrix.container }}
  108. steps:
  109. - uses: actions/checkout@v4
  110. - name: Set up dependencies
  111. run: |
  112. dpkg --add-architecture i386
  113. apt-get update -qq
  114. apt-get install -yqq cmake binutils-mingw-w64-x86-64 gcc g++-mingw-w64 lsb-release mingw-w64 pkg-config
  115. if [ "$(lsb_release -si 2>/dev/null)" = "Debian" ]; then
  116. apt-get install -yqq wine wine32 wine64
  117. else
  118. apt-get install -yqq wine-stable
  119. fi
  120. echo "PACK_NAME=$(lsb_release -cs 2>/dev/null)" >> "${GITHUB_ENV}"
  121. - name: configure
  122. env:
  123. PKG_CONFIG: false
  124. run: cmake -S cmake -B build -DCMAKE_CROSSCOMPILING=ON -DCMAKE_CROSSCOMPILING_EMULATOR=wine -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ -DCMAKE_AR=/usr/bin/x86_64-w64-mingw32-ar -DCMAKE_C_COMPILER_AR=/usr/bin/x86_64-w64-mingw32-ar -DCMAKE_CXX_COMPILER_AR=/usr/bin/x86_64-w64-mingw32-ar -DCMAKE_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib -DCMAKE_C_COMPILER_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/usr/bin/x86_64-w64-mingw32-ranlib -DCMAKE_RC_COMPILER=/usr/bin/x86_64-w64-mingw32-windres
  125. - name: build
  126. run: cmake --build build -j $(nproc)
  127. - name: install
  128. run: cmake --install build --verbose
  129. - uses: actions/upload-artifact@v4
  130. with:
  131. name: mingw64-${{ env.PACK_NAME }}
  132. path: ${{ env.DESTDIR }}
  133. windows:
  134. runs-on: windows-latest
  135. steps:
  136. - uses: actions/checkout@v4
  137. - name: configure
  138. run: cmake -S cmake -B build
  139. - name: build
  140. run: cmake --build build
  141. # FIXME fails with error
  142. # https://github.com/falkTX/Carla/actions/runs/5137608233/jobs/9245932221
  143. #- name: install
  144. #run: cmake --install build --verbose