Skip to content

Support custom bind-mounts #7

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

Merged
merged 2 commits into from
May 16, 2025

Conversation

jacob-hughes
Copy link
Contributor

This adds a TRYCI_BINDMOUNTS environment variable, which can be used to mount arbitrary directories from the host to the docker container to be used in CI.

A common pattern I find myself myself repeating is using tryci to run the full test suite on yk and repeating it a lot once I inevitably find my change has broken something.

If my change includes an upstream change to ykllvm which hasn't landed yet, I can't take advantage of caching and have to wait almost an hour in-between builds.

This hack lets me reduce my tryci builds back down to about 10 minutes by letting me bind-mount a pre-built ykllvm from my host machine. It has similar uses for other submodules like bdwgc in alloy.

@ltratt
Copy link
Member

ltratt commented May 7, 2025

Dumb question: should this be a flag to the tool or an environment variable?

@jacob-hughes
Copy link
Contributor Author

I made it an environment variable so I could add the bind-mounts to my local machine once in my .zshenv (I use a different directory to /opt/ykllvm_cache on my desktop), but I don't have a particularly strong opinion about it.

@ltratt
Copy link
Member

ltratt commented May 7, 2025

I'm generally averse to environment variables, as they're so easy to get wrong. If we can flip it to a CLI switch, I think that would be much less prone to error.

A common pattern I find myself myself repeating is using `tryci` to run
the full test suite on `yk` and repeating it a lot once I inevitably
find my change has broken something.

If my change includes an upstream change to `ykllvm` which hasn't landed
yet, I can't take advantage of caching and have to wait almost an hour
in-between builds.

This hack lets me reduce my tryci builds back down to about 10 minutes
by letting me bind-mount a pre-built `ykllvm` from my host machine. It
has similar uses for other submodules like bdwgc in alloy.
@jacob-hughes
Copy link
Contributor Author

Can I force-push a fix for this that also rebases from master?

@ltratt
Copy link
Member

ltratt commented May 16, 2025

If you force push and rebase at the same time, reviewing has to be started from scratch, so ideally "do one or the other".

@jacob-hughes
Copy link
Contributor Author

Unfortunately while the core idea is the same, the code has changed enough that it probably needs re-reviewing. I can close it and re-raise a new one?

@ltratt
Copy link
Member

ltratt commented May 16, 2025

OK, then please force push and rebase.

@jacob-hughes
Copy link
Contributor Author

Force pushed and rebased.

@ltratt ltratt merged commit 3524a8d into softdevteam:master May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants