diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c23b98c5341..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Travis CI configuration for Vitess. -# -# Note that we have our own test runner written in Go (test.go) which downloads -# our bootstrap Docker image and runs all tests within Docker. -# This solution is slower than running the tests natively, but has the -# advantage that we do not have to install (and cache) any dependencies within -# Travis itself. -# -# For the record, we expect the following overhead per Travis build: -# - 20 seconds Travis starting up the VM. -# - Up to 2 minutes to pull the Docker image. -# - More than a minute to run "make build" and cache the result as temporary -# Docker image. -# -# In total, it will always take up to 4 minutes until the environment is -# bootstrapped and the first test can be run. -# -# Open TODOs: -# - Re-add travis/check_make_proto.sh, ideally as part of test/config.json. -# - Add a presubmit which checks that if bootstrap has changed, and docker image is out of date. - -# sudo is required because we run Docker in our builds. -# See: https://docs.travis-ci.com/user/docker/ -sudo: required - -services: - - docker - -language: go -go: - - 1.12.x -go_import_path: vitess.io/vitess -env: - global: - # Run go build and test with -p 4 (i.e. up to 4 packages are compiled/tested in parallel). - # As of 07/2015 this value works best in a Travis CI container. - # TODO(mberlin): This will probably not be passed through to Docker. Verify and fix this. - - VT_GO_PARALLEL_VALUE=4 - # Note: The per test timeout must always be < 10 minutes because test.go - # does not produce any log output while running and Travis kills a - # build after 10 minutes without log output. - # See: https://docs.travis-ci.com/user/customizing-the-build#Build-Timeouts - # To diagnose stuck tests, add "-follow" to TEST_FLAGS below. Then test.go - # will print the test's output. - - TEST_FLAGS="-docker -use_docker_cache -timeout=8m -print-log" - matrix: - # NOTE: Travis CI schedules up to 5 tests simultaneously. - # All our tests should be spread out as evenly as possible across these 5 slots. - # We should always utilize all 5 slots because the cost of the setup is high (up to four minutes). - - TEST_MATRIX="-shard 0" - - TEST_MATRIX="-shard 1" - - TEST_MATRIX="-shard 2" -script: - - go run test.go $TEST_FLAGS $TEST_MATRIX - # Uncomment the next line to verify the GOMAXPROCS value (should be 2 as of 09/2017). - # - ./docker/test/run.sh mysql57 'go run travis/log_gomaxprocs.go' -notifications: - slack: - secure: S9n4rVWuEvSaF9RZUIx3Nkc2ycpM254zmalyMMbT5EmV1Xz6Zww2FL39RR5d57zsZ2M8GVW5n9uB8Bx57mr+L/wClEltzknYr7MA2/yYNMo5iK83tdQtNNw5U+dZG9/Plhlm4n883lcw9aZOyotNcLg2zBsd48Y74olk4NdmSfo= diff --git a/travis/check_make_proto.sh b/travis/check_make_proto.sh deleted file mode 100755 index 30af1bdcf83..00000000000 --- a/travis/check_make_proto.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/bash - -# Copyright 2019 The Vitess Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Verifies that the generated protobuf and gRPC files under version control -# are up to date. - -# It does so by running "make proto" and verifying that any files tracked by -# Git do not change. If that's not the case, "make proto" must be run and all -# changed files must be included in the pull request. - - -# We do error checking manually. -set +e - -function error() { - script_name=`basename "${BASH_SOURCE[0]}"` - echo - echo -e "ERROR: $script_name: $1" - exit 1 -} - -# Undo changes to vendor.json. govendor sometimes changes it, which is not necessary. -git checkout vendor/vendor.json - -git diff --exit-code -if [ $? -ne 0 ]; then - error "We cannot check if 'make proto' is up to date because some files have already changed. Please see the diff above and fix any local modifications happening prior to this step." -fi - -make proto -if [ $? -ne 0 ]; then - error "Failed to run 'make proto'. Please see the error above and fix it. This should not happen." -fi - -# Check if the file only changed due to a different Go version. -# Go 1.7 has changes to the compression library which results in different -# output and therefore in different generated protobuf code. -git diff -U0 --no-prefix | grep -vE "(bytes of a gzipped FileDescriptorProto|[-\+]{3} .*\.go$|diff --git .*\.go$|^index |^@@ .+ @@ var fileDescriptor0 = \[\]byte\{$|^[-\+] (0x[0-9a-f]{2}, )*0x[0-9a-f]{2},$)" -if [ $? -eq 1 ]; then - # The protobuf files changed only due to a different Go version. - # Revert the changes and continue with the actual check. - git checkout . -fi - -git diff --exit-code -if [ $? -ne 0 ]; then - error "Generated protobuf and gRPC files are not up to date. See diff above. You have to generate them locally and include them in your pull request.\n\nTherefore run a) ./bootstrap.sh b) make proto and c) commit the changed files." -fi diff --git a/travis/log_gomaxprocs.go b/travis/log_gomaxprocs.go deleted file mode 100644 index d6c18b9ce15..00000000000 --- a/travis/log_gomaxprocs.go +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2019 The Vitess Authors. - - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * http://www.apache.org/licenses/LICENSE-2.0 - - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// The sole purpose of this file is to print the configured value of GOMAXPROCS. -// This way we can verify that the Travis CI worker is configured correctly by default. -package main - -import ( - "fmt" - "runtime" -) - -func main() { - fmt.Println("GOMAXPROCS is:", runtime.GOMAXPROCS(0)) -}