-
Notifications
You must be signed in to change notification settings - Fork 569
ci: upgrade to CircleCI 2 #797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
working_directory: /go/src/github.com/gopherjs/gopherjs | ||
docker: | ||
# We have a custom installation of Go below so this version is (largely) irrelevant. | ||
- image: circleci/golang:1.10 | ||
|
||
environment: | ||
SOURCE_MAP_SUPPORT: false | ||
NVM_VERSION: v0.33.9 | ||
GO_VERSION: 1.10.3 | ||
NODE_VERSION: 10.0.0 | ||
|
||
steps: | ||
- checkout | ||
|
||
- run: | | ||
# Install nvm. | ||
git clone https://github.com/creationix/nvm.git $HOME/.nvm | ||
cd $HOME/.nvm && git checkout $NVM_VERSION | ||
echo 'export NVM_DIR="$HOME/.nvm"' >> $BASH_ENV | ||
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV | ||
|
||
- run: | | ||
# Install our own local Go version; we need src/path/filepath to be writable for certain tests. | ||
mkdir $HOME/goroot | ||
curl https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | tar -C $HOME/goroot --strip-components=1 -xz | ||
chmod a+w $HOME/goroot/src/path/filepath | ||
echo 'export PATH="$HOME/goroot/bin:$PATH"' >> $BASH_ENV | ||
|
||
- run: | | ||
# Per https://github.com/gopherjs/gopherjs/pull/687. | ||
echo 'ulimit -s 10000' >> $BASH_ENV | ||
|
||
- run: | | ||
# Setup our required Node version now that nvm is installed. | ||
nvm install $NODE_VERSION node | ||
nvm alias default $NODE_VERSION | ||
|
||
- run: | | ||
# Verify our environment setup. | ||
which node | ||
which go | ||
node --version | ||
go version | ||
go env | ||
|
||
- run: | | ||
# Per https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md. | ||
npm install --global node-gyp | ||
cd node-syscall && node-gyp rebuild && mkdir -p $HOME/.node_libraries/ && cp build/Release/syscall.node $HOME/.node_libraries/syscall.node | ||
|
||
- run: | | ||
go get -t ./... | ||
go install github.com/gopherjs/gopherjs | ||
|
||
- run: | ||
# because this is a long-running test suite | ||
no_output_timeout: 30m | ||
command: | | ||
echo ">> Ensure all go code is well formatted." | ||
diff -u <(echo -n) <(gofmt -d .) | ||
|
||
echo ">> Vetting github.com/gopherjs/gopherjs" | ||
go tool vet *.go | ||
|
||
echo ">> vet all subdirectories except tests and third_party." | ||
for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet | ||
|
||
echo ">> All those packages should have // +build js." | ||
diff -u <(echo -n) <(go list ./compiler/natives/src/...) | ||
|
||
echo ">> Should build successfully (can't run tests, since only client is supported)." | ||
gopherjs install -v net/http | ||
|
||
echo ">> Run the core gopherjs tests; exclusions take from .std_test_pkg_exclusions." | ||
go list std | grep -v -x -f .std_test_pkg_exclusions | xargs gopherjs test --minify -v --short github.com/gopherjs/gopherjs/tests/... | ||
|
||
echo ">> Race tests." | ||
go test -v -race ./... | ||
|
||
echo ">> Non-minified gopherjs tests should also work." | ||
gopherjs test -v fmt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# these are go list std packages we want to exclude from our tests | ||
context | ||
crypto | ||
crypto/internal/cipherhw | ||
crypto/tls | ||
crypto/x509/pkix | ||
debug/gosym | ||
debug/plan9obj | ||
encoding | ||
go/build | ||
go/importer | ||
go/internal/gccgoimporter | ||
go/internal/gcimporter | ||
go/internal/srcimporter | ||
go/types | ||
hash | ||
image/color/palette | ||
image/internal/imageutil | ||
internal/cpu | ||
internal/nettrace | ||
internal/poll | ||
internal/race | ||
internal/singleflight | ||
internal/syscall/unix | ||
internal/syscall/windows | ||
internal/syscall/windows/registry | ||
internal/syscall/windows/sysdll | ||
internal/testenv | ||
internal/testlog | ||
internal/trace | ||
log | ||
log/syslog | ||
net | ||
net/http | ||
net/http/cgi | ||
net/http/httptest | ||
net/http/httptrace | ||
net/http/httputil | ||
net/http/internal | ||
net/http/pprof | ||
net/internal/socktest | ||
net/rpc | ||
net/smtp | ||
os | ||
os/exec | ||
os/signal | ||
os/signal/internal/pty | ||
os/user | ||
plugin | ||
runtime | ||
runtime/cgo | ||
runtime/debug | ||
runtime/internal/atomic | ||
runtime/internal/sys | ||
runtime/pprof | ||
runtime/pprof/internal/profile | ||
runtime/race | ||
runtime/trace | ||
syscall | ||
testing | ||
testing/internal/testdeps | ||
testing/iotest | ||
unsafe | ||
vendor/golang_org/x/crypto/chacha20poly1305 | ||
vendor/golang_org/x/crypto/chacha20poly1305/internal/chacha20 | ||
vendor/golang_org/x/crypto/cryptobyte | ||
vendor/golang_org/x/crypto/cryptobyte/asn1 | ||
vendor/golang_org/x/crypto/curve25519 | ||
vendor/golang_org/x/crypto/poly1305 | ||
vendor/golang_org/x/net/http2/hpack | ||
vendor/golang_org/x/net/idna | ||
vendor/golang_org/x/net/internal/nettest | ||
vendor/golang_org/x/net/lex/httplex | ||
vendor/golang_org/x/net/nettest | ||
vendor/golang_org/x/net/proxy | ||
vendor/golang_org/x/text/secure | ||
vendor/golang_org/x/text/secure/bidirule | ||
vendor/golang_org/x/text/transform | ||
vendor/golang_org/x/text/unicode | ||
vendor/golang_org/x/text/unicode/bidi | ||
vendor/golang_org/x/text/unicode/norm |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We add
os/user
to this exclusion list.