DISTRHO Plugin Framework
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.

237 lines
9.3KB

  1. name: example-plugins
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. pull_request:
  7. branches:
  8. - '*'
  9. env:
  10. DEBIAN_FRONTEND: noninteractive
  11. jobs:
  12. linux-arm64:
  13. runs-on: ubuntu-18.04
  14. steps:
  15. - uses: actions/checkout@v2
  16. with:
  17. submodules: recursive
  18. - name: Set up dependencies
  19. run: |
  20. sudo dpkg --add-architecture arm64
  21. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  22. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-arm64.list
  23. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  24. echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list
  25. sudo apt-get update -qq
  26. sudo apt-get install -yq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static
  27. # fix broken Ubuntu packages missing pkg-config file in multi-arch package
  28. sudo apt-get install -yq libasound2-dev libgl1-mesa-dev liblo-dev libpulse-dev libxcursor-dev libxrandr-dev
  29. sudo ln -s /usr/lib/aarch64-linux-gnu/liblo.so.7 /usr/lib/aarch64-linux-gnu/liblo.so
  30. sudo cp /usr/lib/x86_64-linux-gnu/pkgconfig/liblo.pc /usr/lib/aarch64-linux-gnu/pkgconfig/liblo.pc
  31. sudo sed -i "s/x86_64-linux-gnu/aarch64-linux-gnu/" /usr/lib/aarch64-linux-gnu/pkgconfig/liblo.pc
  32. - name: Build linux arm64 cross-compiled
  33. env:
  34. CC: aarch64-linux-gnu-gcc
  35. CXX: aarch64-linux-gnu-g++
  36. LDFLAGS: -static-libgcc -static-libstdc++
  37. run: |
  38. make features
  39. make -j $(nproc)
  40. - name: Set sha8
  41. id: slug
  42. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  43. - uses: actions/upload-artifact@v2
  44. with:
  45. name: ${{ github.event.repository.name }}-linux-arm64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  46. path: |
  47. bin/*
  48. linux-armhf:
  49. runs-on: ubuntu-18.04
  50. steps:
  51. - uses: actions/checkout@v2
  52. with:
  53. submodules: recursive
  54. - name: Set up dependencies
  55. run: |
  56. sudo dpkg --add-architecture armhf
  57. sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
  58. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-armhf.list
  59. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  60. echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list
  61. sudo apt-get update -qq
  62. sudo apt-get install -yq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static
  63. # fix broken Ubuntu packages missing pkg-config file in multi-arch package
  64. sudo apt-get install -yq libasound2-dev libgl1-mesa-dev liblo-dev libpulse-dev libxcursor-dev libxrandr-dev
  65. sudo ln -s /usr/lib/arm-linux-gnueabihf/liblo.so.7 /usr/lib/arm-linux-gnueabihf/liblo.so
  66. sudo cp /usr/lib/x86_64-linux-gnu/pkgconfig/liblo.pc /usr/lib/arm-linux-gnueabihf/pkgconfig/liblo.pc
  67. sudo sed -i "s/x86_64-linux-gnu/arm-linux-gnueabihf/" /usr/lib/arm-linux-gnueabihf/pkgconfig/liblo.pc
  68. - name: Build linux armhf cross-compiled
  69. env:
  70. CC: arm-linux-gnueabihf-gcc
  71. CXX: arm-linux-gnueabihf-g++
  72. LDFLAGS: -static-libgcc -static-libstdc++
  73. run: |
  74. make features
  75. make -j $(nproc)
  76. - name: Set sha8
  77. id: slug
  78. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  79. - uses: actions/upload-artifact@v2
  80. with:
  81. name: ${{ github.event.repository.name }}-linux-armhf-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  82. path: |
  83. bin/*
  84. linux-x86:
  85. runs-on: ubuntu-18.04
  86. steps:
  87. - uses: actions/checkout@v2
  88. with:
  89. submodules: recursive
  90. - name: Set up dependencies
  91. run: |
  92. sudo dpkg --add-architecture i386
  93. sudo apt-get update -qq
  94. sudo apt-get install -yq g++-multilib libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386
  95. - name: Build linux x86
  96. env:
  97. CFLAGS: -m32
  98. CXXFLAGS: -m32
  99. LDFLAGS: -m32 -static-libgcc -static-libstdc++
  100. PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig
  101. run: |
  102. make features
  103. make -j $(nproc)
  104. - name: Set sha8
  105. id: slug
  106. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  107. - uses: actions/upload-artifact@v2
  108. with:
  109. name: ${{ github.event.repository.name }}-linux-x86-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  110. path: |
  111. bin/*
  112. linux-x86_64:
  113. runs-on: ubuntu-18.04
  114. steps:
  115. - uses: actions/checkout@v2
  116. with:
  117. submodules: recursive
  118. - name: Set up dependencies
  119. run: |
  120. sudo apt-get update -qq
  121. sudo apt-get install -yq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  122. - name: Build linux x86_64
  123. env:
  124. LDFLAGS: -static-libgcc -static-libstdc++
  125. run: |
  126. make features
  127. make -j $(nproc)
  128. - name: Set sha8
  129. id: slug
  130. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  131. - uses: actions/upload-artifact@v2
  132. with:
  133. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  134. path: |
  135. bin/*
  136. macos-universal:
  137. runs-on: macos-10.15
  138. steps:
  139. - uses: actions/checkout@v2
  140. with:
  141. submodules: recursive
  142. - name: Fix up Xcode
  143. run: |
  144. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  145. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  146. - name: Build macOS universal
  147. env:
  148. CFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
  149. CXXFLAGS: -arch x86_64 -arch arm64 -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_12 -mmacosx-version-min=10.12 -mtune=generic -msse -msse2
  150. LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
  151. run: |
  152. make features
  153. make NOOPT=true -j $(sysctl -n hw.logicalcpu)
  154. ./utils/package-osx-bundles.sh
  155. - name: Set sha8
  156. id: slug
  157. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  158. - uses: actions/upload-artifact@v2
  159. with:
  160. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  161. path: |
  162. *-macOS.pkg
  163. bin/*
  164. !bin/*-ladspa.dylib
  165. !bin/*-dssi.dylib
  166. !bin/lv2
  167. !bin/vst2
  168. win32:
  169. runs-on: ubuntu-20.04
  170. steps:
  171. - uses: actions/checkout@v2
  172. with:
  173. submodules: recursive
  174. - name: Set up dependencies
  175. run: |
  176. sudo dpkg --add-architecture i386
  177. sudo apt-get update -qq
  178. sudo apt-get install -yq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  179. - name: Build win32 cross-compiled
  180. env:
  181. CC: i686-w64-mingw32-gcc
  182. CXX: i686-w64-mingw32-g++
  183. EXE_WRAPPER: wine
  184. PKG_CONFIG: "false"
  185. WINEDEBUG: "-all"
  186. run: |
  187. make features
  188. make -j $(nproc)
  189. - name: Set sha8
  190. id: slug
  191. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  192. - uses: actions/upload-artifact@v2
  193. with:
  194. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  195. path: |
  196. bin/*
  197. !bin/*-ladspa.dll
  198. !bin/*-dssi.dll
  199. win64:
  200. runs-on: ubuntu-20.04
  201. steps:
  202. - uses: actions/checkout@v2
  203. with:
  204. submodules: recursive
  205. - name: Set up dependencies
  206. run: |
  207. sudo apt-get update -qq
  208. sudo apt-get install -yq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  209. - name: Build win64 cross-compiled
  210. env:
  211. CC: x86_64-w64-mingw32-gcc
  212. CXX: x86_64-w64-mingw32-g++
  213. EXE_WRAPPER: wine
  214. PKG_CONFIG: "false"
  215. WINEDEBUG: "-all"
  216. run: |
  217. make features
  218. make -j $(nproc)
  219. - name: Set sha8
  220. id: slug
  221. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  222. - uses: actions/upload-artifact@v2
  223. with:
  224. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  225. path: |
  226. bin/*
  227. !bin/*-ladspa.dll
  228. !bin/*-dssi.dll