Skip to content

Commit 865adb9

Browse files
committed
add CI build
1 parent 90effd9 commit 865adb9

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.circleci/config.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
version: 2.1
2+
3+
orbs:
4+
win: circleci/windows@1.0.0
5+
6+
workflows:
7+
workflow:
8+
jobs:
9+
- go-build:
10+
name: Go 1.14
11+
docker-image: circleci/golang:1.14
12+
build-as-module: true
13+
- go-build:
14+
name: Go 1.13
15+
docker-image: circleci/golang:1.13
16+
build-as-module: true
17+
- go-build:
18+
name: Go 1.12
19+
docker-image: circleci/golang:1.12
20+
- go-build:
21+
name: Go 1.11
22+
docker-image: circleci/golang:1.11
23+
- go-build:
24+
name: Go 1.10
25+
docker-image: circleci/golang:1.10
26+
- go-build:
27+
name: Go 1.9
28+
docker-image: circleci/golang:1.9
29+
- go-build:
30+
name: Go 1.8
31+
docker-image: circleci/golang:1.8
32+
- go-build-windows:
33+
name: Windows
34+
35+
jobs:
36+
go-build:
37+
parameters:
38+
docker-image:
39+
type: string
40+
build-as-module:
41+
type: boolean
42+
default: false
43+
44+
docker:
45+
- image: <<parameters.docker-image>>
46+
47+
working_directory: /go/src/github.com/launchdarkly/go-ntlm-proxy-auth
48+
49+
steps:
50+
- checkout
51+
52+
- unless:
53+
condition: <<parameters.build-as-module>>
54+
steps:
55+
- run: go get -t .
56+
57+
- run: go build
58+
59+
go-test-windows:
60+
executor:
61+
name: win/vs2019
62+
shell: powershell.exe
63+
64+
environment:
65+
GOPATH: C:\Users\VssAdministrator\go
66+
PACKAGE_PATH: github.com/launchdarkly/go-ntlm-proxy-auth
67+
68+
steps:
69+
- checkout
70+
- run: go version
71+
- run:
72+
name: move source
73+
command: |
74+
go env GOPATH
75+
mkdir ${env:GOPATH}\src\${env:PACKAGE_PATH}
76+
mv * ${env:GOPATH}\src\${env:PACKAGE_PATH}
77+
- run:
78+
name: build and test
79+
command: |
80+
cd ${env:GOPATH}\src\${env:PACKAGE_PATH}
81+
go get -t .
82+
go test -v -race ./...

0 commit comments

Comments
 (0)