zephyrproject-rtos / action-zephyr-setup

GitHub Action to set up Zephyr build environment
Apache License 2.0
11 stars 12 forks source link

Multiple workflow using different "toolchains" values can fail #17

Open d3zd3z opened 2 months ago

d3zd3z commented 2 months ago

In my rust-lang-zephyr project, I have two workflows, both of which use action-zephyr-setup. The main build, uses a toolchains: with two listed, and the docgen just installs one toolchain. However, when the doc runs, with the second toolchains, it fails with a mkdir zephyr-sdk already exists error. I think the problem is that the cache is still being used, but later code decides it needs to be installed because the toolchains are different, and fails since the directory is already there.

Unfortunately, this is kind of difficult to reproduce. I'll add a link to a failure if I'm able to recreated it.

fabiobaltieri commented 2 months ago

@d3zd3z do you have something we could look at? The SDK should be able to handle an existing zephyr-sdk directory and install the missing ones, but also the SDK cache is keyed on the toolchain spec so it should not really be an issue (https://github.com/zephyrproject-rtos/action-zephyr-setup/blob/main/action.yml#L136-L141).

Somewhat unrelated, have you renamed the repository? I know that that can cause issues, although not as you described.