Skip to content

Commit 32b3d01

Browse files
committed
ci: upgrade to CircleCI 2
Fixes #766
1 parent 27662f8 commit 32b3d01

File tree

3 files changed

+139
-134
lines changed

3 files changed

+139
-134
lines changed

.circleci/config.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: /go/src/github.com/gopherjs/gopherjs
5+
docker:
6+
- image: circleci/golang:1.10
7+
8+
environment:
9+
SOURCE_MAP_SUPPORT: false
10+
11+
steps:
12+
- run: |
13+
git clone https://github.com/creationix/nvm.git $HOME/.nvm
14+
cd $HOME/.nvm && git checkout v0.33.9
15+
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
16+
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
17+
18+
- run: |
19+
mkdir $HOME/goroot
20+
curl https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz | tar -C $HOME/goroot --strip-components=1 -xz
21+
chmod a+w $HOME/goroot/src/path/filepath
22+
echo 'export PATH="$HOME/goroot/bin:$PATH"' >> $BASH_ENV
23+
24+
- run: |
25+
echo 'ulimit -s 10000' >> $BASH_ENV
26+
27+
- run: |
28+
nvm install 6.2.2 node
29+
nvm alias default 6.2.2
30+
31+
- checkout
32+
33+
- run: |
34+
which node
35+
which go
36+
node --version
37+
go version
38+
go env
39+
40+
- run: |
41+
npm install --global node-gyp
42+
cd node-syscall && node-gyp rebuild && mkdir -p $HOME/.node_libraries/ && cp build/Release/syscall.node $HOME/.node_libraries/syscall.node
43+
44+
- run: |
45+
go get -t ./...
46+
go install github.com/gopherjs/gopherjs
47+
48+
- run:
49+
no_output_timeout: 30m
50+
command: |
51+
diff -u <(echo -n) <(gofmt -d .)
52+
go tool vet *.go # Go package in root directory.
53+
for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet # All subdirectories except "tests", "third_party".
54+
diff -u <(echo -n) <(go list ./compiler/natives/src/...) # All those packages should have // +build js.
55+
gopherjs install -v net/http # Should build successfully (can't run tests, since only client is supported).
56+
go list std | grep -v -x -f .std_test_pkg_exclusions | xargs gopherjs test --minify -v --short
57+
go test -v -race ./...
58+
gopherjs test -v fmt # No minification should work.

.std_test_pkg_exclusions

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# these are go list std packages we want to exclude from our tests
2+
context
3+
crypto
4+
crypto/internal/cipherhw
5+
crypto/tls
6+
crypto/x509/pkix
7+
debug/gosym
8+
debug/plan9obj
9+
encoding
10+
go/build
11+
go/importer
12+
go/internal/gccgoimporter
13+
go/internal/gcimporter
14+
go/internal/srcimporter
15+
go/types
16+
hash
17+
image/color/palette
18+
image/internal/imageutil
19+
internal/cpu
20+
internal/nettrace
21+
internal/poll
22+
internal/race
23+
internal/singleflight
24+
internal/syscall/unix
25+
internal/syscall/windows
26+
internal/syscall/windows/registry
27+
internal/syscall/windows/sysdll
28+
internal/testenv
29+
internal/testlog
30+
internal/trace
31+
log
32+
log/syslog
33+
net
34+
net/http
35+
net/http/cgi
36+
net/http/httptest
37+
net/http/httptrace
38+
net/http/httputil
39+
net/http/internal
40+
net/http/pprof
41+
net/internal/socktest
42+
net/rpc
43+
net/smtp
44+
os
45+
os/exec
46+
os/signal
47+
os/signal/internal/pty
48+
os/user
49+
plugin
50+
runtime
51+
runtime/cgo
52+
runtime/debug
53+
runtime/internal/atomic
54+
runtime/internal/sys
55+
runtime/pprof
56+
runtime/pprof/internal/profile
57+
runtime/race
58+
runtime/trace
59+
syscall
60+
testing
61+
testing/internal/testdeps
62+
testing/iotest
63+
unsafe
64+
vendor/golang_org/x/crypto/chacha20poly1305
65+
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20
66+
vendor/golang_org/x/crypto/cryptobyte
67+
vendor/golang_org/x/crypto/cryptobyte/asn1
68+
vendor/golang_org/x/crypto/curve25519
69+
vendor/golang_org/x/crypto/poly1305
70+
vendor/golang_org/x/net/http2/hpack
71+
vendor/golang_org/x/net/idna
72+
vendor/golang_org/x/net/internal/nettest
73+
vendor/golang_org/x/net/lex/httplex
74+
vendor/golang_org/x/net/nettest
75+
vendor/golang_org/x/net/proxy
76+
vendor/golang_org/x/text/secure
77+
vendor/golang_org/x/text/secure/bidirule
78+
vendor/golang_org/x/text/transform
79+
vendor/golang_org/x/text/unicode
80+
vendor/golang_org/x/text/unicode/bidi
81+
vendor/golang_org/x/text/unicode/norm

circle.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)