ci: build for 32 bit, libs: fix overflow (#5700)

This commit is contained in:
Marko
2020-11-26 16:12:25 +01:00
committed by Erik Grinaker
parent 15b70373cc
commit 6c0d4070c2
4 changed files with 30 additions and 6 deletions

View File

@@ -33,6 +33,29 @@ jobs:
name: "${{ github.sha }}-03"
path: ./pkgs.txt.part.03
build-linux:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goarch: ["arm", "amd64"]
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
with:
go-version: "^1.15.4"
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: install
run: GOOS=linux GOARCH=${{ matrix.goarch }} make build
if: "env.GIT_DIFF != ''"
tests:
runs-on: ubuntu-latest
needs: split-test-files
@@ -43,7 +66,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: '^1.15.4'
go-version: "^1.15.4"
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:

View File

@@ -52,7 +52,7 @@ jobs:
test_abci_apps:
runs-on: ubuntu-latest
needs: Build
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
@@ -84,7 +84,7 @@ jobs:
test_abci_cli:
runs-on: ubuntu-latest
needs: Build
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2
@@ -115,7 +115,7 @@ jobs:
test_apps:
runs-on: ubuntu-latest
needs: Build
needs: build
timeout-minutes: 5
steps:
- uses: actions/setup-go@v2

View File

@@ -8,7 +8,7 @@ builds:
- id: "Tendermint"
main: ./cmd/tendermint/main.go
ldflags:
- -s -w -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Version }}
- -s -w -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Version }}
env:
- CGO_ENABLED=0
goos:
@@ -17,6 +17,7 @@ builds:
- windows
goarch:
- amd64
- arm
- arm64
checksum:

View File

@@ -42,7 +42,7 @@ func ParseFraction(f string) (Fraction, error) {
return Fraction{}, errors.New("denominator can't be 0")
}
if numerator > math.MaxInt64 || denominator > math.MaxInt64 {
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", math.MaxInt64)
return Fraction{}, fmt.Errorf("value overflow, numerator and denominator must be less than %d", int64(math.MaxInt64))
}
return Fraction{Numerator: numerator, Denominator: denominator}, nil
}