Skip to content

Commit b337c87

Browse files
authored
CI: Upgrade to CircleCI 2.0. (#864)
This is a minimal diff change to upgrade from CircleCI 1.0 to 2.0 and get it working, since 1.0 has been EOLed. The goal was to keep the config.yml file as simple as possible for now; we can consider changes and enhancements to it as part of future work. Remove os/user package from being tested, since it's failing in the CircleCI 2.0 environment (see tracking issue #863). Resolves #766. Updates #797.
1 parent 0fee806 commit b337c87

File tree

1 file changed

+139
-136
lines changed

1 file changed

+139
-136
lines changed

circle.yml

Lines changed: 139 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,140 @@
1-
machine:
2-
node:
3-
version: 10.0.0
4-
environment:
5-
SOURCE_MAP_SUPPORT: false
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/build-image:ubuntu-14.04-XXL-upstart-1189-5614f37
6+
command: /sbin/init
7+
environment:
8+
SOURCE_MAP_SUPPORT: false
9+
working_directory: ~/go/src/github.com/gopherjs/gopherjs
10+
steps:
11+
- checkout
12+
- run: git clone https://github.com/creationix/nvm $HOME/.nvm && cd $HOME/.nvm && git checkout v0.33.9 && echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV && echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
13+
- run: nvm install 10.0.0 && nvm alias default 10.0.0
14+
- run: cd /usr/local && sudo rm -rf go && curl https://storage.googleapis.com/golang/go1.11.1.linux-amd64.tar.gz | sudo tar -xz
15+
- run: echo 'export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"' >> $BASH_ENV
16+
- run: go get -t -d -v ./...
17+
- run: go install -v
18+
- run: npm install # Install our (dev) dependencies from package.json.
19+
- run: npm install --global node-gyp
20+
- run: cd node-syscall && node-gyp rebuild && mkdir -p ~/.node_libraries && cp build/Release/syscall.node ~/.node_libraries/syscall.node
621

7-
dependencies:
8-
pre:
9-
- cd /usr/local && sudo rm -rf go && curl https://storage.googleapis.com/golang/go1.11.1.linux-amd64.tar.gz | sudo tar -xz && sudo chmod a+w go/src/path/filepath
10-
post:
11-
- mv ./gopherjs $HOME/bin
12-
- npm install --global node-gyp
13-
- npm install # install our (dev) dependencies from package.json
14-
- cd node-syscall && node-gyp rebuild && mkdir -p ~/.node_libraries/ && cp build/Release/syscall.node ~/.node_libraries/syscall.node
15-
16-
test:
17-
override:
18-
- go generate github.com/gopherjs/gopherjs/compiler/prelude
19-
- diff -u <(echo -n) <(git status --porcelain)
20-
- diff -u <(echo -n) <(gofmt -d .)
21-
- go tool vet *.go # Go package in root directory.
22-
- for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet # All subdirectories except "tests", "third_party".
23-
- diff -u <(echo -n) <(go list ./compiler/natives/src/...) # All those packages should have // +build js.
24-
- gopherjs install -v net/http # Should build successfully (can't run tests, since only client is supported).
25-
- >
26-
ulimit -s 10000 && gopherjs test --minify -v --short
27-
github.com/gopherjs/gopherjs/tests
28-
github.com/gopherjs/gopherjs/tests/main
29-
github.com/gopherjs/gopherjs/js
30-
archive/tar
31-
archive/zip
32-
bufio
33-
bytes
34-
compress/bzip2
35-
compress/flate
36-
compress/gzip
37-
compress/lzw
38-
compress/zlib
39-
container/heap
40-
container/list
41-
container/ring
42-
crypto/aes
43-
crypto/cipher
44-
crypto/des
45-
crypto/dsa
46-
crypto/ecdsa
47-
crypto/elliptic
48-
crypto/hmac
49-
crypto/md5
50-
crypto/rand
51-
crypto/rc4
52-
crypto/rsa
53-
crypto/sha1
54-
crypto/sha256
55-
crypto/sha512
56-
crypto/subtle
57-
crypto/x509
58-
database/sql
59-
database/sql/driver
60-
debug/dwarf
61-
debug/elf
62-
debug/macho
63-
debug/pe
64-
encoding/ascii85
65-
encoding/asn1
66-
encoding/base32
67-
encoding/base64
68-
encoding/binary
69-
encoding/csv
70-
encoding/gob
71-
encoding/hex
72-
encoding/json
73-
encoding/pem
74-
encoding/xml
75-
errors
76-
expvar
77-
flag
78-
fmt
79-
go/ast
80-
go/constant
81-
go/doc
82-
go/format
83-
go/parser
84-
go/printer
85-
go/scanner
86-
go/token
87-
hash/adler32
88-
hash/crc32
89-
hash/crc64
90-
hash/fnv
91-
html
92-
html/template
93-
image
94-
image/color
95-
image/draw
96-
image/gif
97-
image/jpeg
98-
image/png
99-
index/suffixarray
100-
io
101-
io/ioutil
102-
math
103-
math/big
104-
math/bits
105-
math/cmplx
106-
math/rand
107-
mime
108-
mime/multipart
109-
mime/quotedprintable
110-
net/http/cookiejar
111-
net/http/fcgi
112-
net/mail
113-
net/rpc/jsonrpc
114-
net/textproto
115-
net/url
116-
os/user
117-
path
118-
path/filepath
119-
reflect
120-
regexp
121-
regexp/syntax
122-
sort
123-
strconv
124-
strings
125-
sync
126-
sync/atomic
127-
testing/quick
128-
text/scanner
129-
text/tabwriter
130-
text/template
131-
text/template/parse
132-
time
133-
unicode
134-
unicode/utf16
135-
unicode/utf8
136-
- go test -v -race ./...
137-
- gopherjs test -v fmt # No minification should work.
22+
- run: go generate github.com/gopherjs/gopherjs/compiler/prelude
23+
- run: diff -u <(echo -n) <(git status --porcelain)
24+
- run: diff -u <(echo -n) <(gofmt -d .)
25+
- run: go tool vet *.go # Go package in root directory.
26+
- run: for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet # All subdirectories except "tests", "third_party".
27+
- run: diff -u <(echo -n) <(go list ./compiler/natives/src/...) # All those packages should have // +build js.
28+
- run: gopherjs install -v net/http # Should build successfully (can't run tests, since only client is supported).
29+
- run: >
30+
ulimit -s 10000 && gopherjs test --minify -v --short
31+
github.com/gopherjs/gopherjs/tests
32+
github.com/gopherjs/gopherjs/tests/main
33+
github.com/gopherjs/gopherjs/js
34+
archive/tar
35+
archive/zip
36+
bufio
37+
bytes
38+
compress/bzip2
39+
compress/flate
40+
compress/gzip
41+
compress/lzw
42+
compress/zlib
43+
container/heap
44+
container/list
45+
container/ring
46+
crypto/aes
47+
crypto/cipher
48+
crypto/des
49+
crypto/dsa
50+
crypto/ecdsa
51+
crypto/elliptic
52+
crypto/hmac
53+
crypto/md5
54+
crypto/rand
55+
crypto/rc4
56+
crypto/rsa
57+
crypto/sha1
58+
crypto/sha256
59+
crypto/sha512
60+
crypto/subtle
61+
crypto/x509
62+
database/sql
63+
database/sql/driver
64+
debug/dwarf
65+
debug/elf
66+
debug/macho
67+
debug/pe
68+
encoding/ascii85
69+
encoding/asn1
70+
encoding/base32
71+
encoding/base64
72+
encoding/binary
73+
encoding/csv
74+
encoding/gob
75+
encoding/hex
76+
encoding/json
77+
encoding/pem
78+
encoding/xml
79+
errors
80+
expvar
81+
flag
82+
fmt
83+
go/ast
84+
go/constant
85+
go/doc
86+
go/format
87+
go/parser
88+
go/printer
89+
go/scanner
90+
go/token
91+
hash/adler32
92+
hash/crc32
93+
hash/crc64
94+
hash/fnv
95+
html
96+
html/template
97+
image
98+
image/color
99+
image/draw
100+
image/gif
101+
image/jpeg
102+
image/png
103+
index/suffixarray
104+
io
105+
io/ioutil
106+
math
107+
math/big
108+
math/bits
109+
math/cmplx
110+
math/rand
111+
mime
112+
mime/multipart
113+
mime/quotedprintable
114+
net/http/cookiejar
115+
net/http/fcgi
116+
net/mail
117+
net/rpc/jsonrpc
118+
net/textproto
119+
net/url
120+
path
121+
path/filepath
122+
reflect
123+
regexp
124+
regexp/syntax
125+
sort
126+
strconv
127+
strings
128+
sync
129+
sync/atomic
130+
testing/quick
131+
text/scanner
132+
text/tabwriter
133+
text/template
134+
text/template/parse
135+
time
136+
unicode
137+
unicode/utf16
138+
unicode/utf8
139+
- run: go test -v -race ./...
140+
- run: gopherjs test -v fmt # No minification should work.

0 commit comments

Comments
 (0)