From 4eeba5aabdcf3998ce6baec95dfdbd9ff215d7a4 Mon Sep 17 00:00:00 2001 From: Lukas Maerdian Date: Thu, 2 Jul 2020 12:16:23 +0200 Subject: [PATCH] Enable cross-compiled 32bit tests on TravisCI (#1392) This PR enables 32-bit cross compilation on Travis CI. There have been multiple reports of badger tests failing on 32-bit machines and a 32 bit CI would be very useful. This PR creates a new Travis CI job which builds and runs tests on a 32-bit machine. Fixes https://github.com/dgraph-io/badger/issues/1385 --- .travis.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1eb1582f..c27ed8633 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,13 +24,27 @@ jobs: env: GOARCH=386 - go: tip env: GOARCH=386 + include: + # Define one extra linux build, which we use to run cross + # compiled 32 bit tests + - os: linux + arch: arm64 + go: "1.14" + env: go_32=yes notifications: email: false slack: secure: X7uBLWYbuUhf8QFE16CoS5z7WvFR8EN9j6cEectMW6mKZ3vwXGwVXRIPsgUq/606DsQdCCx34MR8MRWYGlu6TBolbSe9y0EP0i46yipPz22YtuT7umcVUbGEyx8MZKgG0v1u/zA0O4aCsOBpGAA3gxz8h3JlEHDt+hv6U8xRsSllVLzLSNb5lwxDtcfEDxVVqP47GMEgjLPM28Pyt5qwjk7o5a4YSVzkfdxBXxd3gWzFUWzJ5E3cTacli50dK4GVfiLcQY2aQYoYO7AAvDnvP+TPfjDkBlUEE4MUz5CDIN51Xb+WW33sX7g+r3Bj7V5IRcF973RiYkpEh+3eoiPnyWyxhDZBYilty3b+Hysp6d4Ov/3I3ll7Bcny5+cYjakjkMH3l9w3gs6Y82GlpSLSJshKWS8vPRsxFe0Pstj6QSJXTd9EBaFr+l1ScXjJv/Sya9j8N9FfTuOTESWuaL1auX4Y7zEEVHlA8SCNOO8K0eTfxGZnC/YcIHsR8rePEAcFxfOYQppkyLF/XvAtnb/LMUuu0g4y2qNdme6Oelvyar1tFEMRtbl4mRCdu/krXBFtkrsfUaVY6WTPdvXAGotsFJ0wuA53zGVhlcd3+xAlSlR3c1QX95HIMeivJKb5L4nTjP+xnrmQNtnVk+tG4LSH2ltuwcZSSczModtcBmRefrk= -script: -- go test -v ./... -# Another round of tests after turning off mmap. -- go test -v -vlog_mmap=false github.com/dgraph-io/badger +script: >- + if [ $TRAVIS_OS_NAME = "linux" ] && [ $go_32 ]; then + uname -a + GOOS=linux GOARCH=arm go test -v ./... + # Another round of tests after turning off mmap. + GOOS=linux GOARCH=arm go test -v -vlog_mmap=false github.com/dgraph-io/badger + else + go test -v ./... + # Another round of tests after turning off mmap. + go test -v -vlog_mmap=false github.com/dgraph-io/badger + fi