build.sh 524 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. #
  3. # Build file to set up and run tests
  4. set -ex # exit immediately on error
  5. # Change to repo root
  6. cd $(dirname $0)/../../..
  7. ./tests.sh cpp_distcheck
  8. # Run tests under release docker image.
  9. DOCKER_IMAGE_NAME=protobuf/protoc_$(sha1sum protoc-artifacts/Dockerfile | cut -f1 -d " ")
  10. until docker pull $DOCKER_IMAGE_NAME; do sleep 10; done
  11. docker run -v $(pwd):/var/local/protobuf --rm $DOCKER_IMAGE_NAME \
  12. bash -l /var/local/protobuf/tests.sh cpp || FAILED="true"
  13. if [ "$FAILED" = "true" ]; then
  14. exit 1
  15. fi