Skip to content

Rust toolchain caching in CI could use dynamic CIBW_ENVIRONMENT definitions to set paths #46

@smheidrich

Description

@smheidrich

For Linux, there is currently an overcomplicated mechanism involving moving container-specific cache directories to and from the global cache dir into static paths that have previously been set in PATH and CARGO_HOME/RUSTUP_HOME. I did it this way because I thought I'd only have access to the name of the current architecture inside the before_all, before_build and test/repair commands.

But actually, CIBW_ENVIRONMENT is evaluated inside each container, so I already have access to the name of the architecture there, e.g. via $(uname -m). Hence, this can be simplified to not move anything around and just set architecture-containing paths from the get go.

Cf. pypa/cibuildwheel#1329 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciCI/CD i.e. build/publishing/testing in GitHub Actions et al.effort: highpriority: low

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions