Louis Dionne | 06dbe82 | 2021-03-02 12:59:29 -0500 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # This script starts a shell in a container running the libc++ build bot Docker |
| 4 | # image. That image emulates the environment used by libc++'s Linux builders on |
| 5 | # BuildKite. |
| 6 | # |
| 7 | # Once you're inside the shell, you can run the various build jobs with the |
| 8 | # `run-buildbot` script. |
| 9 | # |
| 10 | # This script must be run from within the LLVM monorepo. Furthermore, the |
| 11 | # monorepo will be mounted as `/llvm` inside the container. Be careful, the |
| 12 | # state in `/llvm` is shared between the container and the host machine, which |
| 13 | # is useful for editing files on the host machine and re-running the build bot |
| 14 | # in the container. |
| 15 | |
| 16 | set -e |
| 17 | |
| 18 | MONOREPO_ROOT="$(git rev-parse --show-toplevel)" |
| 19 | if [[ ! -d "${MONOREPO_ROOT}/libcxx/utils/ci" ]]; then |
| 20 | echo "Was unable to find the root of the LLVM monorepo; are you running from within the monorepo?" |
| 21 | exit 1 |
| 22 | fi |
| 23 | docker pull ldionne/libcxx-builder |
| 24 | docker run -it --volume "${MONOREPO_ROOT}:/llvm" --workdir "/llvm" ldionne/libcxx-builder bash |