|
1 | | ---- |
2 | 1 | name: conan-package |
3 | 2 |
|
4 | | -# Exports the recipe, sources and binaries for Mac, Windows and Linux and upload these to the server such that these can |
5 | | -# be used downstream. |
6 | | -# |
7 | | -# It should run on pushes against main or CURA-* branches, but it will only create the binaries for main and release branches |
8 | | - |
9 | 3 | on: |
10 | | - workflow_dispatch: |
11 | | - inputs: |
12 | | - # FIXME: Not yet implemented |
13 | | - conan_id: |
14 | | - required: false |
15 | | - type: string |
16 | | - description: 'The full conan package ID, e.g. "libnest2d/1.2.3@ultimaker/stable"' |
17 | | - create_latest_alias: |
18 | | - required: true |
19 | | - default: false |
20 | | - type: boolean |
21 | | - description: 'Create latest alias' |
22 | | - create_binaries_windows: |
23 | | - required: true |
24 | | - default: false |
25 | | - type: boolean |
26 | | - description: 'create binaries Windows' |
27 | | - create_binaries_linux: |
28 | | - required: true |
29 | | - default: false |
30 | | - type: boolean |
31 | | - description: 'create binaries Linux' |
32 | | - create_binaries_macos: |
33 | | - required: true |
34 | | - default: false |
35 | | - type: boolean |
36 | | - description: 'create binaries Macos' |
37 | | - |
38 | | - push: |
39 | | - paths: |
40 | | - - 'src/**' |
41 | | - - 'include/**' |
42 | | - - 'test_package/**' |
43 | | - - 'tests/**' |
44 | | - - 'cmake/**' |
45 | | - - 'conanfile.py' |
46 | | - - 'conandata.yml' |
47 | | - - 'CMakeLists.txt' |
48 | | - - 'requirements.txt' |
49 | | - - '.github/workflows/conan-package.yml' |
50 | | - - '.github/workflows/requirements*' |
51 | | - branches: |
52 | | - - main |
53 | | - - master |
54 | | - - 'CURA-*' |
55 | | - - '[0-9].[0-9]' |
56 | | - - '[0-9].[0-9][0-9]' |
57 | | - tags: |
58 | | - - '[0-9].[0-9].[0-9]*' |
59 | | - - '[0-9].[0-9][0-9].[0-9]*' |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'src/**' |
| 7 | + - 'include/**' |
| 8 | + - 'test_package/**' |
| 9 | + - 'tests/**' |
| 10 | + - 'cmake/**' |
| 11 | + - 'conanfile.py' |
| 12 | + - 'conandata.yml' |
| 13 | + - 'CMakeLists.txt' |
| 14 | + - 'requirements.txt' |
| 15 | + - '.github/workflows/conan-package.yml' |
| 16 | + - '.github/workflows/requirements*' |
| 17 | + branches: |
| 18 | + - main |
| 19 | + - 'CURA-*' |
| 20 | + - 'PP-*' |
| 21 | + - 'NP-*' |
| 22 | + - '[0-9].[0-9]*' |
| 23 | + - '[0-9].[0-9][0-9]*' |
60 | 24 |
|
61 | 25 | jobs: |
62 | | - conan-recipe-version: |
63 | | - uses: ultimaker/cura/.github/workflows/conan-recipe-version.yml@main |
64 | | - with: |
65 | | - project_name: nest2d |
66 | | - |
67 | | - conan-package-export: |
68 | | - needs: [ conan-recipe-version ] |
69 | | - uses: ultimaker/cura/.github/workflows/conan-recipe-export.yml@main |
70 | | - with: |
71 | | - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} |
72 | | - recipe_id_latest: ${{ needs.conan-recipe-version.outputs.recipe_id_latest }} |
73 | | - runs_on: 'ubuntu-20.04' |
74 | | - python_version: '3.11.x' |
75 | | - conan_logging_level: 'info' |
76 | | - secrets: inherit |
77 | | - |
78 | | - conan-package-create-windows: |
79 | | - 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_windows) }} |
80 | | - needs: [ conan-recipe-version, conan-package-export ] |
81 | | - |
82 | | - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main |
83 | | - with: |
84 | | - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} |
85 | | - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} |
86 | | - build_id: 4 |
87 | | - runs_on: 'windows-2022' |
88 | | - python_version: '3.11.x' |
89 | | - conan_config_branch: '' |
90 | | - conan_logging_level: 'info' |
91 | | - secrets: inherit |
92 | | - |
93 | | - conan-package-create-macos: |
94 | | - 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_macos) }} |
95 | | - needs: [ conan-recipe-version, conan-package-export ] |
96 | | - |
97 | | - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main |
98 | | - with: |
99 | | - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} |
100 | | - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} |
101 | | - build_id: 3 |
102 | | - runs_on: 'macos-11' |
103 | | - python_version: '3.11.x' |
104 | | - conan_logging_level: 'info' |
105 | | - secrets: inherit |
106 | | - |
107 | | - conan-package-create-linux-modern: |
108 | | - 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) }} |
109 | | - needs: [ conan-recipe-version, conan-package-export ] |
110 | | - |
111 | | - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main |
112 | | - with: |
113 | | - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} |
114 | | - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} |
115 | | - build_id: 2 |
116 | | - runs_on: 'ubuntu-20.04' |
117 | | - python_version: '3.11.x' |
118 | | - conan_logging_level: 'info' |
119 | | - secrets: inherit |
120 | | - |
121 | | - conan-package-create-linux: |
122 | | - 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) }} |
123 | | - needs: [ conan-recipe-version, conan-package-export ] |
124 | | - |
125 | | - uses: ultimaker/cura/.github/workflows/conan-package-create.yml@main |
126 | | - with: |
127 | | - project_name: ${{ needs.conan-recipe-version.outputs.project_name }} |
128 | | - recipe_id_full: ${{ needs.conan-recipe-version.outputs.recipe_id_full }} |
129 | | - build_id: 1 |
130 | | - runs_on: 'ubuntu-20.04' |
131 | | - python_version: '3.11.x' |
132 | | - conan_logging_level: 'info' |
133 | | - secrets: inherit |
134 | | - |
135 | | - notify-export: |
136 | | - if: ${{ always() }} |
137 | | - needs: [ conan-recipe-version, conan-package-export ] |
138 | | - |
139 | | - uses: ultimaker/cura/.github/workflows/notify.yml@main |
140 | | - with: |
141 | | - success: ${{ contains(join(needs.*.result, ','), 'success') }} |
142 | | - success_title: "New Conan recipe exported in ${{ github.repository }}" |
143 | | - success_body: "Exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" |
144 | | - failure_title: "Failed to export Conan Export in ${{ github.repository }}" |
145 | | - failure_body: "Failed to exported ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" |
146 | | - secrets: inherit |
147 | | - |
148 | | - notify-create: |
149 | | - 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)) }} |
150 | | - needs: [ conan-recipe-version, conan-package-create-macos, conan-package-create-windows, conan-package-create-linux, conan-package-create-linux-modern ] |
151 | | - |
152 | | - uses: ultimaker/cura/.github/workflows/notify.yml@main |
153 | | - with: |
154 | | - success: ${{ contains(join(needs.*.result, ','), 'success') }} |
155 | | - success_title: "New binaries created in ${{ github.repository }}" |
156 | | - success_body: "Created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" |
157 | | - failure_title: "Failed to create binaries in ${{ github.repository }}" |
158 | | - failure_body: "Failed to created binaries for ${{ needs.conan-recipe-version.outputs.recipe_id_full }}" |
159 | | - secrets: inherit |
| 26 | + conan-package: |
| 27 | + uses: ultimaker/cura-workflows/.github/workflows/conan-package.yml@main |
| 28 | + secrets: inherit |
0 commit comments