conan-package.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. - '[1-9].[0-9][0-9]'
  43. tags:
  44. - '[1-9].[0-9].[0-9]+'
  45. - '[1-9].[0-9][0-9].[0-9]+'
  46. jobs:
  47. conan-recipe-version:
  48. uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main
  49. with:
  50. project_name: cura
  51. conan-package-export:
  52. needs: [ conan-recipe-version ]
  53. uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main
  54. with:
  55. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  56. recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }}
  57. runs_on: 'ubuntu-20.04'
  58. python_version: '3.10.x'
  59. conan_logging_level: 'info'
  60. secrets: inherit
  61. conan-package-create-linux:
  62. if: ${{ (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux) }}
  63. needs: [ conan-recipe-version, conan-package-export ]
  64. uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main
  65. with:
  66. recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }}
  67. runs_on: 'ubuntu-20.04'
  68. python_version: '3.10.x'
  69. conan_logging_level: 'info'
  70. secrets: inherit
  71. notify-export:
  72. if: ${{ always() }}
  73. needs: [ conan-recipe-version, conan-package-export ]
  74. uses: ultimaker/cura/.github/workflows/notify.yml@main
  75. with:
  76. success: ${{ contains(join(needs.*.result, ','), 'success') }}
  77. success_title: "New Conan recipe exported in ${{ github.repository }}"
  78. success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  79. failure_title: "Failed to export Conan Export in ${{ github.repository }}"
  80. failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  81. secrets: inherit
  82. notify-create:
  83. if: ${{ always() && ((github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'master' || needs.conan-recipe-version.outputs.is_release_branch == 'true')) || (github.event_name == 'workflow_dispatch' && inputs.create_binaries_linux)) }}
  84. needs: [ conan-recipe-version, conan-package-create-linux ]
  85. uses: ultimaker/cura/.github/workflows/notify.yml@main
  86. with:
  87. success: ${{ contains(join(needs.*.result, ','), 'success') }}
  88. success_title: "New binaries created in ${{ github.repository }}"
  89. success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  90. failure_title: "Failed to create binaries in ${{ github.repository }}"
  91. failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}"
  92. secrets: inherit