Skip to content

Commit

Permalink
Add CI tests for ARM64
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciprian Hacman authored and hakman committed Jan 28, 2021
1 parent 8daa61c commit 02d0e46
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .travis.yml
@@ -1,13 +1,17 @@
language: go
dist: xenial
go:
- 1.12.x
- 1.13.x
arch:
- amd64
- arm64
dist: focal
go: 1.15.x
script:
- diff -u <(echo -n) <(gofmt -d *.go)
- diff -u <(echo -n) <(golint $(go list -e ./...) | grep -v YAMLToJSON)
- GO111MODULE=on go vet .
- GO111MODULE=on go test -v -race ./...
- if [[ $TRAVIS_CPU_ARCH == "arm64" ]]; then
GOARCH=arm GOARM=7 GO111MODULE=on go test -v ./...;
fi
- git diff --exit-code
install:
- GO111MODULE=off go get golang.org/x/lint/golint
4 changes: 4 additions & 0 deletions yaml_test.go
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"math"
"reflect"
"runtime"
"sort"
"strconv"
"testing"
Expand All @@ -22,6 +23,9 @@ type MarshalTest struct {
}

func TestMarshal(t *testing.T) {
if runtime.GOARCH == "arm" {
t.Skip("constant 9223372036854775807 overflows int")
}
f32String := strconv.FormatFloat(math.MaxFloat32, 'g', -1, 32)
s := MarshalTest{"a", math.MaxInt64, math.MaxFloat32}
e := []byte(fmt.Sprintf("A: a\nB: %d\nC: %s\n", math.MaxInt64, f32String))
Expand Down

0 comments on commit 02d0e46

Please sign in to comment.