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.

141 lines
4.5KB

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