Skip to content

build system: improve cargo/docker interaction#21465

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
maribu:makefiles/docker-cargo
May 6, 2025
Merged

build system: improve cargo/docker interaction#21465
benpicco merged 1 commit intoRIOT-OS:masterfrom
maribu:makefiles/docker-cargo

Conversation

@maribu
Copy link
Copy Markdown
Member

@maribu maribu commented May 5, 2025

Contribution description

Do not create the cargo folder unconditionally, but only before running docker and only when they do not exist.

Testing procedure

make BUILD_IN_DOCKER=1 BOARD=samr21-xpro -C examples/lang_support/official/rust-hello-world/

without .cargo/git and .cargo/registry should create those folders before running docker, so that they are not created as root.

Issues/PRs references

None

Do not create the cargo folder unconditionally, but only before running
docker and only when they do not exist.
@maribu maribu added Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels May 5, 2025
@maribu maribu requested review from benpicco and chrysn May 5, 2025 14:55
@github-actions github-actions bot added the Area: build system Area: Build system label May 5, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented May 5, 2025

Murdock results

✔️ PASSED

e655d83 build system: improve cargo/docker interaction

Success Failures Total Runtime
10337 0 10337 12m:02s

Artifacts

@benpicco benpicco requested a review from kfessel May 5, 2025 15:13
Copy link
Copy Markdown
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange warning about make trying to create a directory in root is gone

also did a build with docker RIOT/examples/basic/default/ > make ..in-docker-container and it created a .cargo in my home dir << that seems strange to me (creating a unneeded (for default-example) random directory) but by the wording of the makefile this seems intended ( I would think directories like this would be contained in RIOT/build)

@benpicco benpicco added this pull request to the merge queue May 6, 2025
Merged via the queue into RIOT-OS:master with commit bb0c38a May 6, 2025
29 checks passed
@maribu maribu deleted the makefiles/docker-cargo branch May 6, 2025 10:30
@maribu
Copy link
Copy Markdown
Member Author

maribu commented May 6, 2025

Thx :)

@Teufelchen1 Teufelchen1 added this to the Release 2025.07 milestone Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants