conan-package.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. ---
  2. name: conan-package
  3. # Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can
  4. # be used downstream.
  5. #
  6. # It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches
  7. on:
  8. workflow_dispatch:
  9. inputs:
  10. create_binaries_windows:
  11. required: true
  12. default: false
  13. description: 'create binaries Windows'
  14. create_binaries_linux:
  15. required: true
  16. default: false
  17. description: 'create binaries Linux'
  18. create_binaries_macos:
  19. required: true
  20. default: false
  21. description: 'create binaries Macos'
  22. push:
  23. paths:
  24. - 'plugins/**'
  25. - 'resources/**'
  26. - 'cura/**'
  27. - 'icons/**'
  28. - 'tests/**'
  29. - 'packaging/**'
  30. - '.github/workflows/conan-*.yml'
  31. - '.github/workflows/notify.yml'
  32. - '.github/workflows/requirements-conan-package.txt'
  33. - 'requirements*.txt'
  34. - 'conanfile.py'
  35. - 'conandata.yml'
  36. - 'GitVersion.yml'
  37. - '*.jinja'
  38. branches:
  39. - main
  40. - 'CURA-*'
  41. - '[1-9]+.[0-9]+'
  42. tags:
  43. - '[0-9]+.[0-9]+.[0-9]+'
  44. - '[0-9]+.[0-9]+-beta'
  45. jobs:
  46. conan-recipe-version:
  47. uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
  48. with:
  49. project_name: cura
  50. conan-package-export-macos:
  51. needs: [ conan-recipe-version ]
  52. uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main
  53. with:
  54. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  55. recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
  56. recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
  57. runs_on: 'macos-10.15'
  58. python_version: '3.10.x'
  59. conan_logging_level: 'info'
  60. conan_export_binaries: true
  61. secrets: inherit
  62. conan-package-export-linux:
  63. needs: [ conan-recipe-version ]
  64. uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main
  65. with:
  66. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  67. recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
  68. recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
  69. runs_on: 'ubuntu-20.04'
  70. python_version: '3.10.x'
  71. conan_logging_level: 'info'
  72. conan_export_binaries: true
  73. secrets: inherit
  74. conan-package-export-windows:
  75. needs: [ conan-recipe-version ]
  76. uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main
  77. with:
  78. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  79. recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
  80. recipe_id_pr: ${{ needs.conan-recipe-version.outputs.recipe_id_pr }}
  81. runs_on: 'windows-2022'
  82. python_version: '3.10.x'
  83. conan_logging_level: 'info'
  84. conan_export_binaries: true
  85. secrets: inherit
  86. notify-export:
  87. if: ${{ always() }}
  88. needs: [ conan-recipe-version, conan-package-export-linux, conan-package-export-macos, conan-package-export-windows ]
  89. uses: ultimaker/cura/.github/workflows/notify.yml@main
  90. with:
  91. success: ${{ contains(join(needs.*.result, ','), 'success') }}
  92. success_title: "New Conan recipe exported in ${{ github.repository }}"
  93. success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  94. failure_title: "Failed to export Conan Export in ${{ github.repository }}"
  95. failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  96. secrets: inherit