mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-06 13:26:23 +00:00
ci: build for 32 bit, libs: fix overflow (#5700)
This commit is contained in:
25
.github/workflows/coverage.yml
vendored
25
.github/workflows/coverage.yml
vendored
@@ -33,6 +33,29 @@ jobs:
|
|||||||
name: "${{ github.sha }}-03"
|
name: "${{ github.sha }}-03"
|
||||||
path: ./pkgs.txt.part.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:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: split-test-files
|
needs: split-test-files
|
||||||
@@ -43,7 +66,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '^1.15.4'
|
go-version: "^1.15.4"
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: technote-space/get-diff-action@v4
|
- uses: technote-space/get-diff-action@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
6
.github/workflows/tests.yml
vendored
6
.github/workflows/tests.yml
vendored
@@ -52,7 +52,7 @@ jobs:
|
|||||||
|
|
||||||
test_abci_apps:
|
test_abci_apps:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Build
|
needs: build
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
@@ -84,7 +84,7 @@ jobs:
|
|||||||
|
|
||||||
test_abci_cli:
|
test_abci_cli:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Build
|
needs: build
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
@@ -115,7 +115,7 @@ jobs:
|
|||||||
|
|
||||||
test_apps:
|
test_apps:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Build
|
needs: build
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-go@v2
|
- uses: actions/setup-go@v2
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ builds:
|
|||||||
- id: "Tendermint"
|
- id: "Tendermint"
|
||||||
main: ./cmd/tendermint/main.go
|
main: ./cmd/tendermint/main.go
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Version }}
|
- -s -w -X github.com/tendermint/tendermint/version.TMCoreSemVer={{ .Version }}
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
goos:
|
goos:
|
||||||
@@ -17,6 +17,7 @@ builds:
|
|||||||
- windows
|
- windows
|
||||||
goarch:
|
goarch:
|
||||||
- amd64
|
- amd64
|
||||||
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func ParseFraction(f string) (Fraction, error) {
|
|||||||
return Fraction{}, errors.New("denominator can't be 0")
|
return Fraction{}, errors.New("denominator can't be 0")
|
||||||
}
|
}
|
||||||
if numerator > math.MaxInt64 || denominator > math.MaxInt64 {
|
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
|
return Fraction{Numerator: numerator, Denominator: denominator}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user