DON'T USE THIS; IT DOESN'T WORK
Reproducing bazelbuild/bazel#6480 in sipb/homeworld
We run pinned versions of bazel in a build chroot (which is run with systemd-nspawn).
(Recommended: using a debian stretch machine with passwordless sudo. A n1-standard-2 GCP instance should work.)
Take the following steps to set up and enter the build chroot:
$ sudo apt install build-essential debootstrap realpath sudo systemd-container gnupg curl git # dependencies for creating the chroot
$ git clone https://github.com/sipb/homeworld
$ cd homeworld
$ git checkout fce92f7af41c3de400116c90aadbc45bfee36a1f # commit known to exhibit this flaw
$ export HOMEWORLD_CHROOT="$HOME/homeworld-chroot" # location to store the chroot
$ ./build-chroot/create.sh # install a debian stretch chroot with the appropriate packages and bazel 0.26.1
$ gpg --import .circleci/ci-key-private.asc # import a fake version of the private key used for code signing
$ cp .circleci/branches.yaml platform/upload/branches.yaml # use stub configuration for pushing compiled binaries
$ echo ci >platform/upload/BRANCH_NAME # activate stub configuration for pushing compiled binaries
$ sed -i '1d' platform/.bazelrc # disable the workaround that prevents issue #6480 from occurring
$ ./build-chroot/enter.sh # enter the build chroot
In the build chroot:
$ cd platform
$ bazel build //upload