PyO3 / maturin-action

GitHub Action to install and run a custom maturin command with built-in support for cross compilation
MIT License
123 stars 31 forks source link

Support for Manylinux in a Docker-in-Docker runner #265

Closed plied closed 1 month ago

plied commented 1 month ago

This action fails to build cross platform wheels for runners running in docker containers where the docker engine is shared with the host. Setting container: off fixes the issue but disables the cross platform and architecture compilation options.

The reason of the error is simple, this action tries to spawn a new docker container from within the dockerized runner and share some volumes with it, but since the runner shares the docker engine with the host machine, the actual volumes shared are relative to the host's path and not to the github runner's path. See here for more information on the volumes sharing issue

Proposed solution: This issue can be easily solved by adding a couple of extra configuration options to the action that allow changing the directory where the docker volumes are mounted to. I'm working on a PR already, not sure if anyone has encountered this issue before.