Browse Source

Travis 386 (#105)

* Fixed 32bit build.

* Added 32bit build to travis config.
Dmitry Panov 6 years ago
parent
commit
3f2f11566c
2 changed files with 6 additions and 2 deletions
  1. 5 1
      .travis.yml
  2. 1 1
      runtime.go

+ 5 - 1
.travis.yml

@@ -2,6 +2,10 @@ language: go
 go:
 go:
   - 1.x
   - 1.x
 
 
+env:
+  - GIMME_OS=linux GIMME_ARCH=amd64 RACE="-race"
+  - GIMME_OS=linux GIMME_ARCH=386
+
 before_install:
 before_install:
   # use local source tree when testing forks
   # use local source tree when testing forks
   - mkdir -p $GOPATH/src/github.com/dop251/
   - mkdir -p $GOPATH/src/github.com/dop251/
@@ -10,4 +14,4 @@ before_install:
 script:
 script:
   - diff -u <(echo -n) <(gofmt -d .)
   - diff -u <(echo -n) <(gofmt -d .)
   - go vet .
   - go vet .
-  - go test -short -race ./...
+  - go test -short $RACE ./...

+ 1 - 1
runtime.go

@@ -974,7 +974,7 @@ func (r *Runtime) ToValue(i interface{}) Value {
 	case int64:
 	case int64:
 		return intToValue(i)
 		return intToValue(i)
 	case uint:
 	case uint:
-		if i <= math.MaxInt64 {
+		if uint64(i) <= math.MaxInt64 {
 			return intToValue(int64(i))
 			return intToValue(int64(i))
 		} else {
 		} else {
 			return floatToValue(float64(i))
 			return floatToValue(float64(i))