-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
22 lines (21 loc) · 1.09 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
image: golang:1.10
pipelines:
default:
- step:
script:
- # extract current version to the output path
- PACKAGE_PATH="${GOPATH}/src/bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}"
- mkdir -pv "${PACKAGE_PATH}"
- tar -cO --exclude-vcs --exclude=bitbucket-pipelines.yml . | tar -xv -C "${PACKAGE_PATH}"
# install dependencies
- apt-get update
- apt-get --yes install libnlopt-dev gfortran libopenblas-dev
- apt-get --yes install libgsl0-dev # for plotting
- CGO_LDFLAGS="-lopenblas" go get github.com/gonum/blas/cgo
# now godon
- cd "${PACKAGE_PATH}"
- bin/install.sh
- go test -v -short ./...
- #benchmarks are currently disabled
- #go test ./... -run=NONE -bench=.
- test -n "${BITBUCKET_BRANCH}" && curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"${GOPATH}/bin/godon;filename=godon-${BITBUCKET_BRANCH}-$OSTYPE-$(uname -m)"