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.

235 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 install -yq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev
  121. - name: Build linux x86_64
  122. env:
  123. LDFLAGS: -static-libgcc -static-libstdc++
  124. run: |
  125. make features
  126. make -j $(nproc)
  127. - name: Set sha8
  128. id: slug
  129. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  130. - uses: actions/upload-artifact@v2
  131. with:
  132. name: ${{ github.event.repository.name }}-linux-x86_64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  133. path: |
  134. bin/*
  135. macos-universal:
  136. runs-on: macos-10.15
  137. steps:
  138. - uses: actions/checkout@v2
  139. with:
  140. submodules: recursive
  141. - name: Fix up Xcode
  142. run: |
  143. sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/*
  144. sudo xcode-select -s "/Applications/Xcode_12.3.app"
  145. - name: Build macOS universal
  146. env:
  147. 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
  148. 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
  149. LDFLAGS: -arch x86_64 -arch arm64 -mmacosx-version-min=10.12
  150. run: |
  151. make features
  152. make NOOPT=true -j $(sysctl -n hw.logicalcpu)
  153. ./utils/package-osx-bundles.sh
  154. - name: Set sha8
  155. id: slug
  156. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  157. - uses: actions/upload-artifact@v2
  158. with:
  159. name: ${{ github.event.repository.name }}-macOS-universal-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  160. path: |
  161. *-macOS.pkg
  162. bin/*
  163. !bin/*-ladspa.dylib
  164. !bin/*-dssi.dylib
  165. !bin/lv2
  166. !bin/vst2
  167. win32:
  168. runs-on: ubuntu-20.04
  169. steps:
  170. - uses: actions/checkout@v2
  171. with:
  172. submodules: recursive
  173. - name: Set up dependencies
  174. run: |
  175. sudo dpkg --add-architecture i386
  176. sudo apt-get update -qq
  177. sudo apt-get install -yq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386
  178. - name: Build win32 cross-compiled
  179. env:
  180. CC: i686-w64-mingw32-gcc
  181. CXX: i686-w64-mingw32-g++
  182. EXE_WRAPPER: wine
  183. PKG_CONFIG: "false"
  184. WINEDEBUG: "-all"
  185. run: |
  186. make features
  187. make -j $(nproc)
  188. - name: Set sha8
  189. id: slug
  190. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  191. - uses: actions/upload-artifact@v2
  192. with:
  193. name: ${{ github.event.repository.name }}-win32-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  194. path: |
  195. bin/*
  196. !bin/*-ladspa.dll
  197. !bin/*-dssi.dll
  198. win64:
  199. runs-on: ubuntu-20.04
  200. steps:
  201. - uses: actions/checkout@v2
  202. with:
  203. submodules: recursive
  204. - name: Set up dependencies
  205. run: |
  206. sudo apt-get install -yq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable
  207. - name: Build win64 cross-compiled
  208. env:
  209. CC: x86_64-w64-mingw32-gcc
  210. CXX: x86_64-w64-mingw32-g++
  211. EXE_WRAPPER: wine
  212. PKG_CONFIG: "false"
  213. WINEDEBUG: "-all"
  214. run: |
  215. make features
  216. make -j $(nproc)
  217. - name: Set sha8
  218. id: slug
  219. run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
  220. - uses: actions/upload-artifact@v2
  221. with:
  222. name: ${{ github.event.repository.name }}-win64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
  223. path: |
  224. bin/*
  225. !bin/*-ladspa.dll
  226. !bin/*-dssi.dll