Skip to content

Clarification about actions/setup-python usage and potential gains #724

@ulgens

Description

@ulgens

I saw several open source projects following the recommendation from #207 and combining setup-python and setup-uv. I was wondering if there is any noticable gains with this approach and tested it: ulgens/ruffen-docs#11 Assuming there wasn't any rounding in the result values, it only saves a second in some cases - which I don't think is enough to rationalize the use of a second layer. I do understand some could care about even a second, but I think that a GitHub Actions error margin is above a second so the difference is not meaningful.

Yes the documentations don't match up. I will fix that. In the meantime: It is perfectly fine to use actions/setup-python and might even save ~1s. But for most usecases you don't have to use it. I will make that more clear in the documentation.

#197 (comment)

It seems @eifinger had a similar take in his comment, but

and might even save ~1s. But for most usecases you don't have to use it.

didn't make it into the docs.

Also, I'm confused about

because GitHub caches the Python versions alongside the runner.

Does GitHub Actions have multiple cache mechanism and uses a "alongside the runner" cache for setup-python but a different one for setup-uv? Do we have any resources explaining what is expressed here?

My question is, can we please further clarify the docs by

  • Explaining the potential gain is razor-thin
  • For most usecases, it's not necessary
  • How "alongside the runner" caching is different than the general behaviour defined here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions