Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circleci totally change config.yaml #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 23 additions & 32 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
machine:
environment:
CC: gcc
CXX: g++
GOPATH: /home/ubuntu/.go_workspace
GOVER: 1.7.1
GOTAR: /home/ubuntu/go${GOVER}.linux-amd64.tar.gz
post:
- echo $GOVER
- mkdir -p ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
- rm -rf ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/*
- ln -sf ~/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
general:
build_dir: ../.go_workspace/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
dependencies:
cache_directories:
- ~/go1.7.1.linux-amd64.tar.gz
pre:
- echo "GOVER $GOVER"
- echo "GOTAR $GOTAR"
- go version
- test -e ${GOTAR} || wget https://storage.googleapis.com/golang/go${GOVER}.linux-amd64.tar.gz -O ${GOTAR}
- go version | grep "$GOVER " || (sudo rm -rf /usr/local/go; sudo tar -C /usr/local -xzf ${GOTAR})
- go version
post:
- go env
- pwd
- go get golang.org/x/net/context
- go test -i -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/)
test:
override:
- go test -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/)
version: 2.1
jobs:
build:
docker:
- image: 'cimg/go:1.15.3'
# auth:
# username: mydockerhub-user
# password: $DOCKERHUB_PASSWORD
environment:
CC: gcc
CXX: g++
GOPATH: /home/ubuntu/.go_workspace
GOVER: 1.7.1
GOTAR: /home/ubuntu/go${GOVER}.linux-amd64.tar.gz
steps:
- checkout
- run:
name: Unit tests
command: |
go version
test -e ${GOTAR} || wget https://storage.googleapis.com/golang/go${GOVER}.linux-amd64.tar.gz -O ${GOTAR}
go get golang.org/x/net/context
go test -i -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/)