esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
373 stars 43 forks source link

Disable CMake workflow #153

Closed SergioGasquez closed 9 months ago

SergioGasquez commented 9 months ago

@ivmarkov shall we disable the CMake CI? We know it will be failing so it does not give too much information

ivmarkov commented 9 months ago

I would rather not. CMake workflow will continue to be supported, but only for ESP IDF 5.1+, which happens to use a recent-enough GCC toolchain that can link with the libs generated by recent rustc.

In other words, the right fix is to run the CI only for esp idf 5.1 and greater, and remove the options that allow you to generate a project targeting earlier esp idf releases.

ivmarkov commented 9 months ago

I mean, older esp idf versions can still be supported, but it is a lot of work, as you you need to e.g. work with the esp idf 4.x gcc toolchain to compile the esp idf itself, but then use the gcc toolchain from an esp idf 5.1+ sdk to link together the esp idf with the Rust code. We have this setup for the cargo-first approach in esp-idf-sys but for the cmake approach it would be too much effort to support it. For one, it cannot be centralized in esp-idf-sys, as this crate does not control neither the esp idf sdk, nor the toolchains for cmake based builds.

SergioGasquez commented 9 months ago

I would rather not. CMake workflow will continue to be supported, but only for ESP IDF 5.1+, which happens to use a recent-enough GCC toolchain that can link with the libs generated by recent rustc.

In other words, the right fix is to run the CI only for esp idf 5.1 and greater, and remove the options that allow you to generate a project targeting earlier esp idf releases.

Thanks for the clarification! I am ok with only allowing versions greater than 5.1, the template is to generate new projects and I think is good to enforce to use the latest esp-idf version (as long as it's stable).

The workflow currently does the opposite, fails for v5.1 but succeeds for v4.4: https://github.com/esp-rs/esp-idf-template/actions/runs/6219698181/job/16878262796

ivmarkov commented 9 months ago

I would rather not. CMake workflow will continue to be supported, but only for ESP IDF 5.1+, which happens to use a recent-enough GCC toolchain that can link with the libs generated by recent rustc. In other words, the right fix is to run the CI only for esp idf 5.1 and greater, and remove the options that allow you to generate a project targeting earlier esp idf releases.

Thanks for the clarification! I am ok with only allowing versions greater than 5.1, the template is to generate new projects and I think is good to enforce to use the latest esp-idf version (as long as it's stable).

The workflow currently does the opposite, fails for v5.1 but succeeds for v4.4: https://github.com/esp-rs/esp-idf-template/actions/runs/6219698181/job/16878262796

Ah, yeah. 4.4 build works, but not for long ;) Notice that the 4.4 build works with the ESP toolchain, but not with the upstream nightly Rust compiler:

ivmarkov commented 9 months ago

@SergioGasquez Let's do the following:

SergioGasquez commented 9 months ago

Just created the PR. There is not yet a released v5.2, will include it once it's out!

ivmarkov commented 9 months ago

I know I still have to fix esp-idf-sys, but that's probably a separate issue. Closing.