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.

155 lines
5.8KB

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