Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor change to build.py #262

Merged
merged 4 commits into from
Mar 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,16 @@ def package_scripts(build_root):
def run_generate():
print "Running generate..."
run("go get github.com/gogo/protobuf/protoc-gen-gogo")
command = "go generate ./..."
code = os.system(command)
if code != 0:
print "Generate Failed"
return False
else:
print "Generate Succeeded"
run("go generate ./...")
print "Generate succeeded."
return True

def go_get(branch, update=False, no_stash=False):
get_command = ""
if update:
get_command += "go get -u -f -d ./..."
get_command += "go get -t -u -f -d ./..."
else:
get_command += "go get -d ./..."
get_command += "go get -t -d ./..."

# 'go get' switches to master, so stash what we currently have
changes = run("git status --porcelain").strip()
Expand Down Expand Up @@ -180,6 +175,8 @@ def run(command, allow_failure=False, shell=False):
out = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=shell)
else:
out = subprocess.check_output(command.split(), stderr=subprocess.STDOUT)
if debug:
print "[DEBUG] command output: \n{}\n".format(out)
except subprocess.CalledProcessError as e:
print ""
print ""
Expand Down Expand Up @@ -346,14 +343,9 @@ def upload_packages(packages, bucket_name=None, nightly=False):
return 0

def run_tests(race, parallel, timeout, no_vet):
print "Retrieving Go dependencies...",
get_command = "go get -d -t ./..."
sys.stdout.flush()
run(get_command)
get_command = "go get golang.org/x/tools/cmd/vet"
print "Downloading vet tool..."
sys.stdout.flush()
run(get_command)
print "done."
run("go get golang.org/x/tools/cmd/vet")
print "Running tests:"
print "\tRace: ", race
if parallel is not None:
Expand Down Expand Up @@ -450,7 +442,7 @@ def build(version=None,
elif arch == "armhf" or arch == "arm":
build_command += "GOARM=6 "
elif arch == "arm64":
build_command += "GOARM=arm64 "
build_command += "GOARM=7 "
else:
print "!! Invalid ARM architecture specifed: {}".format(arch)
print "Please specify either 'armel', 'armhf', or 'arm64'"
Expand Down Expand Up @@ -797,7 +789,8 @@ def main():
return 1

if run_get:
go_get(branch, update=update, no_stash=no_stash)
if not go_get(branch, update=update, no_stash=no_stash):
return 1

if test:
if not run_tests(race, parallel, timeout, no_vet):
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ deployment:
release:
tag: /v[0-9]+(\.[0-9]+){2}(-rc[0-9]+)?/
commands:
- ./build.sh --clean --generate --package --upload --platform=all --arch=all
- ./build.sh --debug --clean --generate --package --upload --platform=all --arch=all
8 changes: 4 additions & 4 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,24 @@ fi
case $ENVIRONMENT_INDEX in
0)
# 64 bit tests
run_test_docker Dockerfile_build_ubuntu64 test_64bit --test --generate --no-stash
run_test_docker Dockerfile_build_ubuntu64 test_64bit --debug --test --generate --no-stash
rc=$?
;;
1)
# 64 bit race tests
GORACE="halt_on_error=1"
run_test_docker Dockerfile_build_ubuntu64 test_64bit_race --test --generate --no-stash --race
run_test_docker Dockerfile_build_ubuntu64 test_64bit_race --debug --test --generate --no-stash --race
rc=$?
;;
2)
# 32 bit tests
run_test_docker Dockerfile_build_ubuntu32 test_32bit --test --generate --no-stash
run_test_docker Dockerfile_build_ubuntu32 test_32bit --debug --test --generate --no-stash
rc=$?
;;
3)
# 64 bit tests on golang go1.6
GO_CHECKOUT=go1.6rc2
run_test_docker Dockerfile_build_ubuntu64_git test_64bit_go1.6 --test --generate --no-stash
run_test_docker Dockerfile_build_ubuntu64_git test_64bit_go1.6 --debug --test --generate --no-stash
rc=$?
;;
"save")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/influxdb/influxdb/tsdb/internal/meta.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.