DISTRHO Nekobi
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.

190 lines
7.0KB

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