mirror of https://github.com/rclone/rclone.git
Test compilation of all arches
* Add compile_all step to Makefile * Add this to travis * Add -compile-only flag to cross-compile.go to save time making the zips
This commit is contained in:
parent
92d2e1f8d7
commit
ee6a35d750
|
@ -15,6 +15,7 @@ install:
|
||||||
script:
|
script:
|
||||||
- make check
|
- make check
|
||||||
- make quicktest
|
- make quicktest
|
||||||
|
- make compile_all
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- GOTAGS=cmount
|
- GOTAGS=cmount
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -123,6 +123,13 @@ upload_beta:
|
||||||
rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' build/ memstore:beta-rclone-org
|
rclone --config bin/travis.rclone.conf -v copy --include '*beta-latest*' build/ memstore:beta-rclone-org
|
||||||
@echo Beta release ready at $(BETA_URL)
|
@echo Beta release ready at $(BETA_URL)
|
||||||
|
|
||||||
|
compile_all:
|
||||||
|
ifdef GO_LATEST
|
||||||
|
go run bin/cross-compile.go -parallel 8 -compile-only $(BUILDTAGS) $(TAG)β
|
||||||
|
else
|
||||||
|
@echo Skipping compile all as not on Go stable
|
||||||
|
endif
|
||||||
|
|
||||||
travis_beta:
|
travis_beta:
|
||||||
git log $(LAST_TAG).. > /tmp/git-log.txt
|
git log $(LAST_TAG).. > /tmp/git-log.txt
|
||||||
go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt -exclude "^windows/" -parallel 8 $(BUILDTAGS) $(TAG)β
|
go run bin/cross-compile.go -release beta-latest -git-log /tmp/git-log.txt -exclude "^windows/" -parallel 8 $(BUILDTAGS) $(TAG)β
|
||||||
|
|
|
@ -28,6 +28,7 @@ var (
|
||||||
cgo = flag.Bool("cgo", false, "Use cgo for the build")
|
cgo = flag.Bool("cgo", false, "Use cgo for the build")
|
||||||
noClean = flag.Bool("no-clean", false, "Don't clean the build directory before running.")
|
noClean = flag.Bool("no-clean", false, "Don't clean the build directory before running.")
|
||||||
tags = flag.String("tags", "", "Space separated list of build tags")
|
tags = flag.String("tags", "", "Space separated list of build tags")
|
||||||
|
compileOnly = flag.Bool("compile-only", false, "Just build the binary, not the zip.")
|
||||||
)
|
)
|
||||||
|
|
||||||
// GOOS/GOARCH pairs we build for
|
// GOOS/GOARCH pairs we build for
|
||||||
|
@ -117,6 +118,7 @@ func compileArch(version, goos, goarch, dir string) {
|
||||||
env = append(env, flags...)
|
env = append(env, flags...)
|
||||||
}
|
}
|
||||||
runEnv(args, env)
|
runEnv(args, env)
|
||||||
|
if !*compileOnly {
|
||||||
// Now build the zip
|
// Now build the zip
|
||||||
run("cp", "-a", "../MANUAL.txt", filepath.Join(dir, "README.txt"))
|
run("cp", "-a", "../MANUAL.txt", filepath.Join(dir, "README.txt"))
|
||||||
run("cp", "-a", "../MANUAL.html", filepath.Join(dir, "README.html"))
|
run("cp", "-a", "../MANUAL.html", filepath.Join(dir, "README.html"))
|
||||||
|
@ -131,6 +133,7 @@ func compileArch(version, goos, goarch, dir string) {
|
||||||
run("ln", zip, copyAsZip)
|
run("ln", zip, copyAsZip)
|
||||||
}
|
}
|
||||||
run("rm", "-rf", dir)
|
run("rm", "-rf", dir)
|
||||||
|
}
|
||||||
log.Printf("Done compiling %s/%s", goos, goarch)
|
log.Printf("Done compiling %s/%s", goos, goarch)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue