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