59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
version: 2.1
|
|
|
|
|
|
jobs:
|
|
test:
|
|
docker:
|
|
- image: circleci/golang:1.14
|
|
working_directory: /home/circleci/go/src/github.com/shirou/gopsutil
|
|
environment:
|
|
GOPATH: /home/circleci/go
|
|
steps:
|
|
- run:
|
|
command: |
|
|
echo -e 'export PATH=$GOPATH/bin:$PATH' >> $BASH_ENV
|
|
source /home/circleci/.bashrc
|
|
- checkout
|
|
- run:
|
|
command: make init_tools
|
|
- run:
|
|
command: dep ensure
|
|
- run:
|
|
command: make vet
|
|
- run:
|
|
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:
|
|
version: 2
|
|
test:
|
|
jobs:
|
|
- macos
|
|
- test
|