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.

146 lines
4.6KB

  1. name: cmake
  2. on:
  3. push:
  4. branches:
  5. - '*'
  6. pull_request:
  7. branches:
  8. - '*'
  9. env:
  10. BUILD_TYPE: Release
  11. jobs:
  12. ubuntu-20-04:
  13. strategy:
  14. matrix:
  15. target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
  16. runs-on: ubuntu-20.04
  17. steps:
  18. - uses: actions/checkout@v3
  19. with:
  20. submodules: recursive
  21. - uses: distrho/dpf-cmake-action@v1
  22. with:
  23. target: ${{ matrix.target }}
  24. dpf_path: .
  25. ubuntu-22-04:
  26. strategy:
  27. matrix:
  28. target: [linux-arm64, linux-armhf, linux-i686, linux-riscv64, linux-x86_64, win32, win64, pluginval]
  29. runs-on: ubuntu-22.04
  30. steps:
  31. - uses: actions/checkout@v3
  32. with:
  33. submodules: recursive
  34. - uses: distrho/dpf-cmake-action@v1
  35. with:
  36. target: ${{ matrix.target }}
  37. dpf_path: .
  38. macos-11:
  39. strategy:
  40. matrix:
  41. target: [macos-intel, macos-universal, macos-10.15]
  42. runs-on: macos-11
  43. steps:
  44. - uses: actions/checkout@v3
  45. with:
  46. submodules: recursive
  47. - uses: distrho/dpf-cmake-action@v1
  48. with:
  49. target: ${{ matrix.target }}
  50. dpf_path: .
  51. macos-12:
  52. strategy:
  53. matrix:
  54. target: [macos-intel, macos-universal, macos-10.15]
  55. runs-on: macos-12
  56. steps:
  57. - uses: actions/checkout@v3
  58. with:
  59. submodules: recursive
  60. - uses: distrho/dpf-cmake-action@v1
  61. with:
  62. target: ${{ matrix.target }}
  63. dpf_path: .
  64. cmake_win32:
  65. runs-on: windows-2019
  66. steps:
  67. - name: Set environment
  68. run: |
  69. echo "release_arch=Win32" >> "${Env:GITHUB_ENV}"
  70. echo "vcpkg_triplet=x86-windows-static" >> "${Env:GITHUB_ENV}"
  71. echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
  72. - name: Restore from cache and install vcpkg
  73. uses: lukka/run-vcpkg@v6
  74. with:
  75. setupOnly: true
  76. vcpkgTriplet: ${{env.vcpkg_triplet}}
  77. vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
  78. #- name: Install packages
  79. # run: |
  80. # & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
  81. - uses: actions/checkout@v2
  82. with:
  83. submodules: recursive
  84. - name: Create Build Environment
  85. working-directory: ${{runner.workspace}}
  86. run: cmake -E make_directory build
  87. - name: Configure CMake
  88. working-directory: ${{runner.workspace}}/build
  89. run: |
  90. 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"
  91. - name: Build all
  92. working-directory: ${{runner.workspace}}/build
  93. run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
  94. - name: Show built files
  95. working-directory: ${{runner.workspace}}/build/bin
  96. run: tree
  97. - uses: actions/upload-artifact@v2
  98. with:
  99. name: Win32 artifacts
  100. path: ${{runner.workspace}}/build/bin/
  101. cmake_win64:
  102. runs-on: windows-2019
  103. steps:
  104. - name: Set environment
  105. run: |
  106. echo "release_arch=x64" >> "${Env:GITHUB_ENV}"
  107. echo "vcpkg_triplet=x64-windows-static" >> "${Env:GITHUB_ENV}"
  108. echo "vcpkg_git_commit_id=a3db16a4475b963cacf0260068c497fb72c8f3c0" >> "${Env:GITHUB_ENV}"
  109. - name: Restore from cache and install vcpkg
  110. uses: lukka/run-vcpkg@v6
  111. with:
  112. setupOnly: true
  113. vcpkgTriplet: ${{env.vcpkg_triplet}}
  114. vcpkgGitCommitId: ${{env.vcpkg_git_commit_id}}
  115. #- name: Install packages
  116. # run: |
  117. # & "${Env:VCPKG_ROOT}/vcpkg" install "cairo:${Env:vcpkg_triplet}"
  118. - uses: actions/checkout@v2
  119. with:
  120. submodules: recursive
  121. - name: Create Build Environment
  122. working-directory: ${{runner.workspace}}
  123. run: cmake -E make_directory build
  124. - name: Configure CMake
  125. working-directory: ${{runner.workspace}}/build
  126. run: |
  127. 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"
  128. - name: Build all
  129. working-directory: ${{runner.workspace}}/build
  130. run: cmake --build . --config "${Env:BUILD_TYPE}" -j 2
  131. - name: Show built files
  132. working-directory: ${{runner.workspace}}/build/bin
  133. run: tree
  134. - uses: actions/upload-artifact@v2
  135. with:
  136. name: Win64 artifacts
  137. path: ${{runner.workspace}}/build/bin/