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.

231 lines
8.8KB

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