-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
revisit how espressif/idf-rust containers are build #247
Comments
If we are removing espup from the riscv targets, there is the open question how to tag this containers, since we are not using the xtensa-toolchain anymore. The logical thing is using the specific rust nightly-version used as a base? Though this is a bit awkward since it will look like the xtensa based containers have a non overlapping version scheme compared to the riscv variants? |
One other big advantage of using the proposal of already build containers for direct consumption is, that people don't need the GITHUB_ACCESS token anymore since they don't trigger the espup install. This is a win for me. |
A few notes regarding this. Using
This is already in a "bad" state, for example
That's definitely an improvement, I am no expert in CI, so my only concern is if it will be faster, but seems like you clearly think that, so let's give it a shot! |
So my current goals would be:
@SergioGasquez does this look good to you or are you against something here. Obviously we really need to test if what i propose here creates benefits, but i am pretty sure it will make it. |
In some repos, since we use a matrix with the target, we could use the docker tag that only contains the target, if I am not mistaken. If this is true, RISC V targets should be rebuilt daily too.
For Xtensa targets, this would add unnecessary stuff, right?
Maybe
|
For caching purposes i suspect that its faster to have one base image for all jobs in a matrix (even if they started in parallel), That's why my idea is for all CI to relight on one image, and on-top of that do the stuff we do normally. But we should test this out if it holds true.
Currently we install the xtensa toolchain always on something with a normal rust installation(but not purging the platform stable part). This bit would just be replaced with the nightly one, Though yeah we should maybe look into it, will check it out.
The question is what do we do with the all image? |
I see a few options:
|
Note for future me, if we end up changing anything, we should update https://esp-rs.github.io/book/installation/using-containers.html |
i am fine with option 3 though this would imply that we build the all container always only with latest xtensa-rust and not with any other version, i think currently we can publish new versions also for older xtensa-rust versions? Regarding the stable installation fragments, i think i was wrong here because currently we install it with The xtensa variants could reuse the all Dockerfile, and we just would have one for riscv specific builds |
Yes, we could have an input parameter that is the Xtensa Rust version, we could keep that in case the latest Xtensa version is buggy. It would also be good if we could go back to a specific date so its not only overwritten.
I am fine with two Dockerfiles, it would make things simpler. And build the |
small update:
|
Wow! Thanks for the updates, that's a great improvement!! |
Motivation
Currently we are building all containers published with this file. Currently we get containers for the following configuration matrix:
MCU target all
I think the all target is fine as is. The image should be used as a good base image for CI, it only needed to be pulled per run and can be cached through all target runs. ( I think this is currently underutilized in all CI's) Without moving to much the topic here just this small note: Installing the espup toolchain with an action for every CI run makes no sense as its wasted 1-2 min for every action for every target. Instead we should use this base-image and test against it.
Testing if one commit of a library is running on the tool-chain is orthogonal to the question - can the tool-chain currently be build? . We should have one job that may build the nightly tool-chain everyday - and every library CI should use this base image for all it's runs and not build the complete tool-chain from scratch !!!
MCU target specific
This image variant has its uses where the user only want to build a project for one specific target. The use case for it is for example the vscode devcontainer used in esp-template and esp-idf-template. Since each generated template is only used for one specific target the underlying container should also reflect that. In my opinion this containers should be as fast and as lightweight as possible making it nice to use.
Observation: riscv targets on std and no_std don't need espup at all. I am sure for it for the std variants so i want to know from you if that's also true for the no_std variants. This would free up a good chunk of space on all riscv images.
Independent of container or not what is currently not clear to me : The crosstoll-ng riscv toolchain that is included in espup includes 4 different risc-v targets:
1. rv32i_zicsr_zifencei
2. rv32imac_zicsr_zifencei
3. rv32imafc_zicsr_zifencei
4. rv32imc_zicsr_zifenceiIn my understanding we only need number 2 and 4 correct? The other would only be huge bloat
EDIT: i made a seperate issue for this on espup. And since it seems to be confirmed that we don't need this for no_std and std this is no issue forward on optimizing the containers
Proposal
The text was updated successfully, but these errors were encountered: