Skip to content

Commit 7f4f974

Browse files
revert manual collecting of build context packages
- adds workaround for conan-io/conan#19366 - partially reverts #19
1 parent 1857724 commit 7f4f974

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

.github/workflows/rebuildDependencies.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -225,41 +225,23 @@ jobs:
225225
- name: Remove build requirements' binaries
226226
run: |
227227
graphFile='graph.json'
228-
hostPackagesFile='packages-host.json'
229-
buildPackagesFile='packages-build.json'
230-
buildFilteredPackagesFile='packages-build-filtered.txt'
228+
packageListFile='pkglist.json'
231229
230+
# the special conf is a workaround for https://github.com/conan-io/conan/issues/19366
232231
conan graph info . \
233232
$CONAN_PROFILES \
234233
${{ matrix.conan_options }} \
235234
--format=json \
236235
--build=never \
237236
--no-remote \
237+
--conf:all="tools.graph:skip_binaries=False" \
238238
> "$graphFile"
239-
240239
conan list \
241240
--graph "$graphFile" \
242241
--graph-context=build-only \
243242
--format=json \
244-
> $buildPackagesFile
245-
246-
conan list \
247-
--graph "$graphFile" \
248-
--graph-context=host \
249-
--format=json \
250-
> $hostPackagesFile
251-
252-
# Some are both build and host requirements and must not be removed
253-
# => exclude them from the list
254-
python3 -c '
255-
import json, sys
256-
build_dict = json.load(open(sys.argv[1]))["Local Cache"] # => {"pkg1": {...}, "pkg2": {...}, ...}
257-
host_list = json.load(open(sys.argv[2]))["Local Cache"] # => ["pkg1", "pkg2", ...]
258-
filtered_dict = {k: v for k, v in build_dict.items() if k not in host_list}
259-
json.dump({"Local Cache": filtered_dict}, open(sys.argv[3], "w"))
260-
' "$buildPackagesFile" "$hostPackagesFile" "$buildFilteredPackagesFile"
261-
262-
conan remove --list "$buildFilteredPackagesFile" --confirm
243+
> "$packageListFile"
244+
conan remove --list "$packageListFile" --confirm
263245
264246
- name: Create list of built packages
265247
run: |

0 commit comments

Comments
 (0)