File tree Expand file tree Collapse file tree 1 file changed +5
-23
lines changed
Expand file tree Collapse file tree 1 file changed +5
-23
lines changed Original file line number Diff line number Diff 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 : |
You can’t perform that action at this time.
0 commit comments