build-solaris.bash 1012 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. set -euo pipefail
  3. # Copyright (C) 2017 The Syncthing Authors.
  4. #
  5. # This Source Code Form is subject to the terms of the Mozilla Public
  6. # License, v. 2.0. If a copy of the MPL was not distributed with this file,
  7. # You can obtain one at http://mozilla.org/MPL/2.0/.
  8. # This script should be run by Jenkins as './src/github.com/syncthing/syncthing/jenkins/build-macos.bash',
  9. # that is, it should be run from $GOPATH.
  10. . src/github.com/syncthing/syncthing/jenkins/common.bash
  11. init
  12. # after init we are in the source directory
  13. clean
  14. fetchExtra
  15. # Solaris always uses cgo, as opposed to our regular cross builds
  16. export CGO_ENABLED=1
  17. # Quick build, generate assets
  18. go run build.go build syncthing
  19. # Test the stuff we are going to build only, as discosrv etc fails.
  20. # -race is not supported on Solaris.
  21. echo Testing
  22. go test ./lib/... ./cmd/syncthing
  23. echo
  24. # Specifically set "syncthing" target as discosrv currently doesn't build
  25. echo Building
  26. go run build.go tar syncthing
  27. mv *.tar.gz "$WORKSPACE"
  28. echo