|
| 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 | + nvm install 6.2.2 node |
| 26 | + nvm alias default 6.2.2 |
| 27 | +
|
| 28 | + - checkout |
| 29 | + |
| 30 | + - run: | |
| 31 | + which node |
| 32 | + which go |
| 33 | + node --version |
| 34 | + go version |
| 35 | + go env |
| 36 | +
|
| 37 | + - run: | |
| 38 | + npm install --global node-gyp |
| 39 | + cd node-syscall && node-gyp rebuild && mkdir -p $HOME/.node_libraries/ && cp build/Release/syscall.node $HOME/.node_libraries/syscall.node |
| 40 | +
|
| 41 | + - run: | |
| 42 | + go get -t ./... |
| 43 | + go install github.com/gopherjs/gopherjs |
| 44 | +
|
| 45 | + - run: |
| 46 | + no_output_timeout: 30m |
| 47 | + command: | |
| 48 | + diff -u <(echo -n) <(gofmt -d .) |
| 49 | + go tool vet *.go # Go package in root directory. |
| 50 | + for d in */; do echo $d; done | grep -v tests/ | grep -v third_party/ | xargs go tool vet # All subdirectories except "tests", "third_party". |
| 51 | + diff -u <(echo -n) <(go list ./compiler/natives/src/...) # All those packages should have // +build js. |
| 52 | + gopherjs install -v net/http # Should build successfully (can't run tests, since only client is supported). |
| 53 | + ulimit -s 10000 && gopherjs test --minify -v --short \ |
| 54 | + github.com/gopherjs/gopherjs/tests \ |
| 55 | + github.com/gopherjs/gopherjs/tests/main \ |
| 56 | + github.com/gopherjs/gopherjs/js \ |
| 57 | + archive/tar \ |
| 58 | + archive/zip \ |
| 59 | + bufio \ |
| 60 | + bytes \ |
| 61 | + compress/bzip2 \ |
| 62 | + compress/flate \ |
| 63 | + compress/gzip \ |
| 64 | + compress/lzw \ |
| 65 | + compress/zlib \ |
| 66 | + container/heap \ |
| 67 | + container/list \ |
| 68 | + container/ring \ |
| 69 | + crypto/aes \ |
| 70 | + crypto/cipher \ |
| 71 | + crypto/des \ |
| 72 | + crypto/dsa \ |
| 73 | + crypto/ecdsa \ |
| 74 | + crypto/elliptic \ |
| 75 | + crypto/hmac \ |
| 76 | + crypto/md5 \ |
| 77 | + crypto/rand \ |
| 78 | + crypto/rc4 \ |
| 79 | + crypto/rsa \ |
| 80 | + crypto/sha1 \ |
| 81 | + crypto/sha256 \ |
| 82 | + crypto/sha512 \ |
| 83 | + crypto/subtle \ |
| 84 | + crypto/x509 \ |
| 85 | + database/sql \ |
| 86 | + database/sql/driver \ |
| 87 | + debug/dwarf \ |
| 88 | + debug/elf \ |
| 89 | + debug/macho \ |
| 90 | + debug/pe \ |
| 91 | + encoding/ascii85 \ |
| 92 | + encoding/asn1 \ |
| 93 | + encoding/base32 \ |
| 94 | + encoding/base64 \ |
| 95 | + encoding/binary \ |
| 96 | + encoding/csv \ |
| 97 | + encoding/gob \ |
| 98 | + encoding/hex \ |
| 99 | + encoding/json \ |
| 100 | + encoding/pem \ |
| 101 | + encoding/xml \ |
| 102 | + errors \ |
| 103 | + expvar \ |
| 104 | + flag \ |
| 105 | + fmt \ |
| 106 | + go/ast \ |
| 107 | + go/constant \ |
| 108 | + go/doc \ |
| 109 | + go/format \ |
| 110 | + go/parser \ |
| 111 | + go/printer \ |
| 112 | + go/scanner \ |
| 113 | + go/token \ |
| 114 | + hash/adler32 \ |
| 115 | + hash/crc32 \ |
| 116 | + hash/crc64 \ |
| 117 | + hash/fnv \ |
| 118 | + html \ |
| 119 | + html/template \ |
| 120 | + image \ |
| 121 | + image/color \ |
| 122 | + image/draw \ |
| 123 | + image/gif \ |
| 124 | + image/jpeg \ |
| 125 | + image/png \ |
| 126 | + index/suffixarray \ |
| 127 | + io \ |
| 128 | + io/ioutil \ |
| 129 | + math \ |
| 130 | + math/big \ |
| 131 | + math/bits \ |
| 132 | + math/cmplx \ |
| 133 | + math/rand \ |
| 134 | + mime \ |
| 135 | + mime/multipart \ |
| 136 | + mime/quotedprintable \ |
| 137 | + net/http/cookiejar \ |
| 138 | + net/http/fcgi \ |
| 139 | + net/mail \ |
| 140 | + net/rpc/jsonrpc \ |
| 141 | + net/textproto \ |
| 142 | + net/url \ |
| 143 | + os/user \ |
| 144 | + path \ |
| 145 | + path/filepath \ |
| 146 | + reflect \ |
| 147 | + regexp \ |
| 148 | + regexp/syntax \ |
| 149 | + sort \ |
| 150 | + strconv \ |
| 151 | + strings \ |
| 152 | + sync \ |
| 153 | + sync/atomic \ |
| 154 | + testing/quick \ |
| 155 | + text/scanner \ |
| 156 | + text/tabwriter \ |
| 157 | + text/template \ |
| 158 | + text/template/parse \ |
| 159 | + time \ |
| 160 | + unicode \ |
| 161 | + unicode/utf16 \ |
| 162 | + unicode/utf8 |
| 163 | + go test -v -race ./... |
| 164 | + gopherjs test -v fmt # No minification should work. |
0 commit comments