nathanchance · GitHub

@nathanchance

parse_version() no longer works at all for me:
  Traceback (most recent call last):
   File ".../continuous-integration2/scripts/markdown-badges.py", line 59, in <module>
      columns = sorted(compilers, key=parse_version, reverse=True)
    File "/usr/lib/python3.10/site-packages/packaging/version.py", line 197, in __init__
      raise InvalidVersion(f"Invalid version: '{version}'")
  packaging.version.InvalidVersion: Invalid version: 'clang-11'
We were already being warned about this being deprecated so we need to
fix this properly. Roll our own classes based on _BaseVersion, which
allows us to construct the exact key for comparison.
This allows us to order the matrix as follows, which I feel is a more accurate
order of priority of looking for breakage (upstream to downstream).
  - Upstream "named" trees
  - Upstream LTS trees
  - Upstream maintainer trees
  - Android trees
  - ChromeOS trees
From there, each category is sorted by how recent each kernel version is
relative to the others in that category.
Closes: ClangBuiltLinux#502
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Read the original on github.com ↗