mirror of
				https://github.com/go-delve/delve.git
				synced 2025-10-31 10:47:27 +08:00 
			
		
		
		
	Add travis CI
This commit is contained in:
		
							
								
								
									
										10
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.travis.yml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | language: go | ||||||
|  | sudo: false | ||||||
|  |  | ||||||
|  | os: | ||||||
|  |   - linux | ||||||
|  |   - osx | ||||||
|  |  | ||||||
|  | go: | ||||||
|  |   - 1.4.2 | ||||||
|  |   - tip | ||||||
							
								
								
									
										42
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								Makefile
									
									
									
									
									
								
							| @ -1,7 +1,7 @@ | |||||||
| .DEFAULT_GOAL=test | .DEFAULT_GOAL=test | ||||||
| UNAME = $(shell uname) | UNAME=$(shell uname) | ||||||
| PREFIX=github.com/derekparker/delve | PREFIX=github.com/derekparker/delve | ||||||
| GOVERSION = $(shell go version) | GOVERSION=$(shell go version) | ||||||
|  |  | ||||||
| # We must compile with -ldflags="-s" to omit | # We must compile with -ldflags="-s" to omit | ||||||
| # DWARF info on OSX when compiling with the | # DWARF info on OSX when compiling with the | ||||||
| @ -10,44 +10,49 @@ GOVERSION = $(shell go version) | |||||||
| # unable to execute. | # unable to execute. | ||||||
| # See https://github.com/golang/go/issues/11887#issuecomment-126117692. | # See https://github.com/golang/go/issues/11887#issuecomment-126117692. | ||||||
| ifneq (,$(findstring 1.5, $(GOVERSION))) | ifneq (,$(findstring 1.5, $(GOVERSION))) | ||||||
| FLAGS=-ldflags="-s" | 	FLAGS=-ldflags="-s" | ||||||
| endif | endif | ||||||
|  |  | ||||||
| build: | # If we're on OSX make sure the proper CERT env var is set. | ||||||
| 	go build $(FLAGS) github.com/derekparker/delve/cmd/dlv |  | ||||||
| ifeq "$(UNAME)" "Darwin" | ifeq "$(UNAME)" "Darwin" | ||||||
| ifeq "$(CERT)" "" | ifeq "$(CERT)" "" | ||||||
| 	$(error You must provide a CERT env var) | 	$(error You must provide a CERT environment variable in order to codesign the binary.) | ||||||
| endif | endif | ||||||
|  | endif | ||||||
|  |  | ||||||
|  | deps: | ||||||
|  | 	go get -u github.com/peterh/liner | ||||||
|  | 	go get -u github.com/spf13/cobra | ||||||
|  | 	go get -u golang.org/x/sys/unix | ||||||
|  | 	go get -u github.com/davecheney/profile | ||||||
|  |  | ||||||
|  | build: deps | ||||||
|  | 	go build $(FLAGS) github.com/derekparker/delve/cmd/dlv | ||||||
|  | ifeq "$(UNAME)" "Darwin" | ||||||
| 	codesign -s $(CERT) ./dlv | 	codesign -s $(CERT) ./dlv | ||||||
| endif | endif | ||||||
|  |  | ||||||
| install: | install: deps | ||||||
| 	go install $(FLAGS) github.com/derekparker/delve/cmd/dlv | 	go install $(FLAGS) github.com/derekparker/delve/cmd/dlv | ||||||
| ifeq "$(UNAME)" "Darwin" | ifeq "$(UNAME)" "Darwin" | ||||||
| ifeq "$(CERT)" "" |  | ||||||
| 	$(error You must provide a CERT env var) |  | ||||||
| endif |  | ||||||
| 	codesign -s $(CERT) $(GOPATH)/bin/dlv | 	codesign -s $(CERT) $(GOPATH)/bin/dlv | ||||||
| endif | endif | ||||||
|  |  | ||||||
| test: | test: deps | ||||||
| ifeq "$(UNAME)" "Darwin" | ifeq "$(UNAME)" "Darwin" | ||||||
| ifeq "$(CERT)" "" | ifeq "$(TRAVIS)" "true" | ||||||
| 	$(error You must provide a CERT env var) | 	sudo -E go test -v ./... | ||||||
| endif | else | ||||||
| 	go test $(PREFIX)/terminal $(PREFIX)/dwarf/frame $(PREFIX)/dwarf/op $(PREFIX)/dwarf/util $(PREFIX)/source $(PREFIX)/dwarf/line | 	go test $(PREFIX)/terminal $(PREFIX)/dwarf/frame $(PREFIX)/dwarf/op $(PREFIX)/dwarf/util $(PREFIX)/source $(PREFIX)/dwarf/line | ||||||
| 	go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test $(TESTFLAGS) && rm ./proc.test | 	go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test $(TESTFLAGS) && rm ./proc.test | ||||||
| 	go test -c  $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test $(TESTFLAGS) && rm ./test.test | 	go test -c  $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test $(TESTFLAGS) && rm ./test.test | ||||||
|  | endif | ||||||
| else | else | ||||||
| 	go test -v ./... | 	go test -v ./... | ||||||
| endif | endif | ||||||
|  |  | ||||||
| test-proc-run: | test-proc-run: | ||||||
| ifeq "$(UNAME)" "Darwin" | ifeq "$(UNAME)" "Darwin" | ||||||
| ifeq "$(CERT)" "" |  | ||||||
| 	$(error You must provide a CERT env var) |  | ||||||
| endif |  | ||||||
| 	go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test -test.run $(RUN) && rm ./proc.test | 	go test -c $(FLAGS) $(PREFIX)/proc && codesign -s $(CERT) ./proc.test && ./proc.test -test.run $(RUN) && rm ./proc.test | ||||||
| else | else | ||||||
| 	go test $(PREFIX) -run $(RUN) | 	go test $(PREFIX) -run $(RUN) | ||||||
| @ -55,9 +60,6 @@ endif | |||||||
|  |  | ||||||
| test-integration-run: | test-integration-run: | ||||||
| ifeq "$(UNAME)" "Darwin" | ifeq "$(UNAME)" "Darwin" | ||||||
| ifeq "$(CERT)" "" |  | ||||||
| 	$(error You must provide a CERT env var) |  | ||||||
| endif |  | ||||||
| 	go test -c $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test -test.run $(RUN) && rm ./test.test | 	go test -c $(FLAGS) $(PREFIX)/service/test && codesign -s $(CERT) ./test.test && ./test.test -test.run $(RUN) && rm ./test.test | ||||||
| else | else | ||||||
| 	go test $(PREFIX)/service/rest -run $(RUN) | 	go test $(PREFIX)/service/rest -run $(RUN) | ||||||
|  | |||||||
| @ -2,6 +2,7 @@ | |||||||
|  |  | ||||||
| [](https://raw.githubusercontent.com/derekparker/delve/master/LICENSE) | [](https://raw.githubusercontent.com/derekparker/delve/master/LICENSE) | ||||||
| [](https://godoc.org/github.com/derekparker/delve) | [](https://godoc.org/github.com/derekparker/delve) | ||||||
|  | [](https://travis-ci.org/derekparker/delve) | ||||||
| [](https://gitter.im/derekparker/delve?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | [](https://gitter.im/derekparker/delve?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||||||
|  |  | ||||||
| **This project is currently pre 1.0.** | **This project is currently pre 1.0.** | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Derek Parker
					Derek Parker