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.

162 lines
5.2KB

  1. name: cmake
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. tags:
  7. - '*'
  8. pull_request:
  9. branches:
  10. - '*'
  11. env:
  12. BUILD_TYPE: Release
  13. jobs:
  14. cmake_linux:
  15. runs-on: ubuntu-18.04
  16. steps:
  17. - uses: actions/checkout@v2
  18. with:
  19. submodules: recursive
  20. - name: Set up dependencies
  21. run: |
  22. sudo apt-get update && \
  23. sudo apt-get install \
  24. cmake \
  25. ninja-build \
  26. libjack-jackd2-dev \
  27. liblo-dev \
  28. libgl-dev \
  29. libcairo2-dev \
  30. libdbus-1-dev \
  31. libx11-dev
  32. - name: Create Build Environment
  33. shell: bash
  34. working-directory: ${{runner.workspace}}
  35. run: cmake -E make_directory build
  36. - name: Configure CMake
  37. shell: bash
  38. working-directory: ${{runner.workspace}}/build
  39. run: |
  40. cmake "$GITHUB_WORKSPACE" -G Ninja \
  41. -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
  42. - name: Build all
  43. shell: bash
  44. working-directory: ${{runner.workspace}}/build
  45. run: cmake --build . --config "$BUILD_TYPE" -j 2
  46. - name: Display built files
  47. shell: bash
  48. working-directory: ${{runner.workspace}}/build/bin
  49. run: ls -lFR
  50. - uses: actions/upload-artifact@v2
  51. with:
  52. name: Linux artifacts
  53. path: ${{runner.workspace}}/build/bin/
  54. cmake_macos:
  55. runs-on: macos-11
  56. steps:
  57. - uses: actions/checkout@v2
  58. with:
  59. submodules: recursive
  60. - name: Create Build Environment
  61. shell: bash
  62. working-directory: ${{runner.workspace}}
  63. run: cmake -E make_directory build
  64. - name: Configure CMake
  65. shell: bash
  66. working-directory: ${{runner.workspace}}/build
  67. run: |
  68. cmake "$GITHUB_WORKSPACE" \
  69. -DCMAKE_BUILD_TYPE="$BUILD_TYPE"
  70. - name: Build all
  71. shell: bash
  72. working-directory: ${{runner.workspace}}/build
  73. run: cmake --build . --config "$BUILD_TYPE" -j 2
  74. - name: Display built files
  75. shell: bash
  76. working-directory: ${{runner.workspace}}/build/bin
  77. run: ls -lFR
  78. - uses: actions/upload-artifact@v2
  79. with:
  80. name: macOS artifacts
  81. path: ${{runner.workspace}}/build/bin/
  82. cmake_win32:
  83. runs-on: windows-2019
  84. steps:
  85. - name: Set environment
  86. run: |
  87. echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
  88. echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
  89. echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
  90. - name: Restore from cache and install vcpkg
  91. uses: lukka/run-vcpkg@v6
  92. with:
  93. setupOnly: true
  94. vcpkgTriplet: ${{env.vcpkg_triplet}}
  95. vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
  96. #- name: Install packages
  97. # run: |
  98. # & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
  99. - uses: actions/checkout@v2
  100. with:
  101. submodules: recursive
  102. - name: Create Build Environment
  103. working-directory: ${{runner.workspace}}
  104. run: cmake -E make_directory build
  105. - name: Configure CMake
  106. working-directory: ${{runner.workspace}}/build
  107. run: |
  108. cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
  109. - name: Build all
  110. working-directory: ${{runner.workspace}}/build
  111. run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
  112. - name: Show built files
  113. working-directory: ${{runner.workspace}}/build/bin
  114. run: tree
  115. - uses: actions/upload-artifact@v2
  116. with:
  117. name: Win32 artifacts
  118. path: ${{runner.workspace}}/build/bin/
  119. cmake_win64:
  120. runs-on: windows-2019
  121. steps:
  122. - name: Set environment
  123. run: |
  124. echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
  125. echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
  126. echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
  127. - name: Restore from cache and install vcpkg
  128. uses: lukka/run-vcpkg@v6
  129. with:
  130. setupOnly: true
  131. vcpkgTriplet: ${{env.vcpkg_triplet}}
  132. vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
  133. #- name: Install packages
  134. # run: |
  135. # & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
  136. - uses: actions/checkout@v2
  137. with:
  138. submodules: recursive
  139. - name: Create Build Environment
  140. working-directory: ${{runner.workspace}}
  141. run: cmake -E make_directory build
  142. - name: Configure CMake
  143. working-directory: ${{runner.workspace}}/build
  144. run: |
  145. cmake "${Env:GITHUB_WORKSPACE}" -G"Visual Studio 16 2019" -A"${Env:release_arch}" -DCMAKE_BUILD_TYPE="${Env:BUILD_TYPE}" -DVCPKG_TARGET_TRIPLET="${Env:vcpkg_triplet}" -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
  146. - name: Build all
  147. working-directory: ${{runner.workspace}}/build
  148. run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
  149. - name: Show built files
  150. working-directory: ${{runner.workspace}}/build/bin
  151. run: tree
  152. - uses: actions/upload-artifact@v2
  153. with:
  154. name: Win64 artifacts
  155. path: ${{runner.workspace}}/build/bin/