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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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.

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