mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
Merge pull request #843 from shirou/feature/add_mac_build_on_circleci
add macos test on CircleCI.
This commit is contained in:
commit
0169511c59
@ -1,4 +1,6 @@
|
|||||||
version: 2
|
version: 2.1
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
docker:
|
docker:
|
||||||
@ -20,9 +22,37 @@ jobs:
|
|||||||
command: go build -v
|
command: go build -v
|
||||||
- run:
|
- run:
|
||||||
command: make build_test
|
command: make build_test
|
||||||
|
macos:
|
||||||
|
macos:
|
||||||
|
xcode: "10.2.0"
|
||||||
|
environment:
|
||||||
|
GOPATH: /Users/distiller/go
|
||||||
|
GOVERSION: "1.13.8"
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
curl -O https://dl.google.com/go/go${GOVERSION}.darwin-amd64.pkg
|
||||||
|
sudo installer -pkg go${GOVERSION}.darwin-amd64.pkg -target /
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
make init_tools
|
||||||
|
mkdir -p ${GOPATH}/src/github.com/shirou/
|
||||||
|
mv /Users/distiller/project /Users/distiller/go/src/github.com/shirou/gopsutil
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
export PATH=$GOPATH/bin:$PATH
|
||||||
|
cd /Users/distiller/go/src/github.com/shirou/gopsutil && dep ensure
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
cd /Users/distiller/go/src/github.com/shirou/gopsutil && go build -v
|
||||||
|
- run:
|
||||||
|
command: |
|
||||||
|
cd /Users/distiller/go/src/github.com/shirou/gopsutil && make macos_test
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
test:
|
test:
|
||||||
jobs:
|
jobs:
|
||||||
|
- macos
|
||||||
- test
|
- test
|
||||||
|
4
Makefile
4
Makefile
@ -33,5 +33,9 @@ ifeq ($(shell uname -s), Darwin)
|
|||||||
endif
|
endif
|
||||||
@echo 'Successfully built on all known operating systems'
|
@echo 'Successfully built on all known operating systems'
|
||||||
|
|
||||||
|
macos_test:
|
||||||
|
CGO_ENABLED=0 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
|
||||||
|
CGO_ENABLED=1 GOOS=darwin go test ./... | $(BUILD_FAIL_PATTERN)
|
||||||
|
|
||||||
init_tools:
|
init_tools:
|
||||||
go get github.com/golang/dep/cmd/dep
|
go get github.com/golang/dep/cmd/dep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user