Skip to content

Commit 6dc3172

Browse files
committed
ci: upgrade to CircleCI 2
Fixes #766
1 parent 8dffc02 commit 6dc3172

File tree

3 files changed

+165
-137
lines changed

3 files changed

+165
-137
lines changed

.circleci/config.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: /go/src/github.com/gopherjs/gopherjs
5+
docker:
6+
# We have a custom installation of Go below so this version is (largely) irrelevant.
7+
- image: circleci/golang:1.10
8+
9+
environment:
10+
SOURCE_MAP_SUPPORT: false
11+
NVM_VERSION: v0.33.9
12+
GO_VERSION: 1.10.1
13+
NODE_VERSION: 6.2.2
14+
15+
steps:
16+
- checkout
17+
18+
- run: |
19+
# Install nvm.
20+
git clone https://github.com/creationix/nvm.git $HOME/.nvm
21+
cd $HOME/.nvm && git checkout $NVM_VERSION
22+
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV
23+
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
24+
25+
- run: |
26+
# Install our own local Go version; we need src/path/filepath to be writable for certain tests.
27+
mkdir $HOME/goroot
28+
curl https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | tar -C $HOME/goroot --strip-components=1 -xz
29+
chmod a+w $HOME/goroot/src/path/filepath
30+
echo 'export PATH="$HOME/goroot/bin:$PATH"' >> $BASH_ENV
31+
32+
- run: |
33+
# Per https://github.com/gopherjs/gopherjs/pull/687.
34+
echo 'ulimit -s 10000' >> $BASH_ENV
35+
36+
- run: |
37+
# Setup our required Node version now that nvm is installed.
38+
nvm install $NODE_VERSION node
39+
nvm alias default $NODE_VERSION
40+
41+
- run: |
42+
# Verify our environment setup.
43+
which node
44+
which go
45+
node --version
46+
go version
47+
go env
48+
49+
- run: |
50+
# Per https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md.
51+
npm install --global node-gyp
52+
cd node-syscall && node-gyp rebuild && mkdir -p $HOME/.node_libraries/ && cp build/Release/syscall.node $HOME/.node_libraries/syscall.node
53+
54+
- run: |
55+
go get -t ./...
56+
go install github.com/gopherjs/gopherjs
57+
58+
- run:
59+
# because this is a long-running test suite
60+
no_output_timeout: 30m
61+
command: |
62+
# Ensure all go code is well formatted.
63+
diff -u <(echo -n) <(gofmt -d .)
64+
65+
# Vetting github.com/gopherjs/gopherjs
66+
go tool vet *.go
67+
68+
# vet all subdirectories except "tests" and "third_party".
69+
for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet
70+
71+
# All those packages should have // +build js.
72+
diff -u <(echo -n) <(go list ./compiler/natives/src/...)
73+
74+
# Should build successfully (can't run tests, since only client is supported).
75+
gopherjs install -v net/http
76+
77+
# Run the core gopherjs tests; exclusions take from .std_test_pkg_exclusions.
78+
go list std | grep -v -x -f .std_test_pkg_exclusions | xargs gopherjs test --minify -v --short github.com/gopherjs/gopherjs/tests/...
79+
80+
# Race tests.
81+
go test -v -race ./...
82+
83+
# Non-minified gopherjs tests should also work.
84+
gopherjs test -v fmt

.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 & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)