jenkins: Build natively on Solaris

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3957
This commit is contained in:
Jakob Borg 2017-02-05 11:20:15 +00:00
parent 8cccecceba
commit a72f5379fb
2 changed files with 38 additions and 1 deletions

View File

@ -29,7 +29,6 @@ platforms=(
linux-amd64 linux-386 linux-arm linux-arm64 linux-ppc64 linux-ppc64le
netbsd-amd64 netbsd-386
openbsd-amd64 openbsd-386
solaris-amd64
)
echo Building

38
jenkins/build-solaris.bash Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
set -euo pipefail
# Copyright (C) 2017 The Syncthing Authors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
# This script should be run by Jenkins as './src/github.com/syncthing/syncthing/jenkins/build-macos.bash',
# that is, it should be run from $GOPATH.
. src/github.com/syncthing/syncthing/jenkins/common.bash
init
# after init we are in the source directory
clean
fetchExtra
# Solaris always uses cgo, as opposed to our regular cross builds
export CGO_ENABLED=1
# Quick build, generate assets
go run build.go build syncthing
# Test the stuff we are going to build only, as discosrv etc fails.
# -race is not supported on Solaris.
echo Testing
go test ./lib/... ./cmd/syncthing
echo
# Specifically set "syncthing" target as discosrv currently doesn't build
echo Building
go run build.go tar syncthing
mv *.tar.gz "$WORKSPACE"
echo