Add support for MIPS64 and RISCV64 on CI.

This commit is contained in:
Alex Huszagh 2021-05-24 16:01:43 -05:00
parent 5be8002fc3
commit ec69d9f11d
2 changed files with 40 additions and 5 deletions

View File

@ -10,6 +10,8 @@ env:
global: global:
- fastfloat_DEPENDENCY_CACHE_DIR=$HOME/.dep_cache - fastfloat_DEPENDENCY_CACHE_DIR=$HOME/.dep_cache
services:
- docker
# the ppc64le and s390x images use cmake 3.10, but fast_float requires 3.11. # the ppc64le and s390x images use cmake 3.10, but fast_float requires 3.11.
# so we compile cmake from source in those images. # so we compile cmake from source in those images.
@ -186,8 +188,22 @@ matrix:
- SANITIZE="on" - SANITIZE="on"
compiler: clang-10-sanitize compiler: clang-10-sanitize
- arch: amd64
os: linux
env:
- TOOLCHAIN="mips64"
- arch: amd64
os: linux
env:
- TOOLCHAIN="riscv64"
before_install: before_install:
- eval "${COMPILER}" - eval "${COMPILER}"
- |
if [ "$TOOLCHAIN" != "" ] ; then
docker pull ahuszagh/cross:"$TOOLCHAIN"
fi
install: install:
- | - |
@ -218,8 +234,9 @@ install:
- ${CXX} --version - ${CXX} --version
script: script:
- mkdir build - |
- cd build if [ "$TOOLCHAIN" != "" ] ; then
- cmake -DFASTFLOAT_TEST=ON .. docker run -v "$(pwd)":/ff ahuszagh/cross:"$TOOLCHAIN" /bin/bash -c "cd ff && ci/script.sh $TOOLCHAIN"
- make -j2 else
- ctest --output-on-failure -R basictest ci/script.sh
fi

18
ci/script.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
TOOLCHAIN="$1"
mkdir build
cd build
if [ "$TOOLCHAIN" != "" ] ; then
cmake -DFASTFLOAT_TEST=ON .. -DCMAKE_TOOLCHAIN_FILE=/toolchains/"$TOOLCHAIN".cmake
else
cmake -DFASTFLOAT_TEST=ON ..
fi
make -j 2
if [ "$TOOLCHAIN" != "" ] ; then
qemu-"$TOOLCHAIN" tests/basictest
else
ctest --output-on-failure -R basictest
fi