travis: build to all supported linux architectures (#3235)

This commit is contained in:
Péter Szilágyi
2016-11-04 13:48:20 +02:00
committed by Felix Lange
parent 2ad5dba50a
commit afe41de6b3
2 changed files with 26 additions and 1 deletions

View File

@ -158,6 +158,13 @@ func doInstall(cmdline []string) {
build.MustRun(goinstall)
return
}
// If we are cross compiling to ARMv5 ARMv6 or ARMv7, clean any prvious builds
if *arch == "arm" {
os.RemoveAll(filepath.Join(runtime.GOROOT(), "pkg", runtime.GOOS+"_arm"))
for _, path := range filepath.SplitList(build.GOPATH()) {
os.RemoveAll(filepath.Join(path, "pkg", runtime.GOOS+"_arm"))
}
}
// Seems we are cross compiling, work around forbidden GOBIN
goinstall := goToolArch(*arch, "install", buildFlags(env)...)
goinstall.Args = append(goinstall.Args, "-v")
@ -318,6 +325,9 @@ func doArchive(cmdline []string) {
func archiveBasename(arch string, env build.Environment) string {
platform := runtime.GOOS + "-" + arch
if arch == "arm" {
platform += os.Getenv("GOARM")
}
archive := platform + "-" + build.VERSION()
if isUnstableBuild(env) {
archive += "-unstable"