Skip to content

Commit ec69d9f

Browse files
committed
Add support for MIPS64 and RISCV64 on CI.
1 parent 5be8002 commit ec69d9f

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

.travis.yml

+22-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ env:
1010
global:
1111
- fastfloat_DEPENDENCY_CACHE_DIR=$HOME/.dep_cache
1212

13+
services:
14+
- docker
1315

1416
# the ppc64le and s390x images use cmake 3.10, but fast_float requires 3.11.
1517
# so we compile cmake from source in those images.
@@ -186,8 +188,22 @@ matrix:
186188
- SANITIZE="on"
187189
compiler: clang-10-sanitize
188190

191+
- arch: amd64
192+
os: linux
193+
env:
194+
- TOOLCHAIN="mips64"
195+
196+
- arch: amd64
197+
os: linux
198+
env:
199+
- TOOLCHAIN="riscv64"
200+
189201
before_install:
190202
- eval "${COMPILER}"
203+
- |
204+
if [ "$TOOLCHAIN" != "" ] ; then
205+
docker pull ahuszagh/cross:"$TOOLCHAIN"
206+
fi
191207
192208
install:
193209
- |
@@ -218,8 +234,9 @@ install:
218234
- ${CXX} --version
219235

220236
script:
221-
- mkdir build
222-
- cd build
223-
- cmake -DFASTFLOAT_TEST=ON ..
224-
- make -j2
225-
- ctest --output-on-failure -R basictest
237+
- |
238+
if [ "$TOOLCHAIN" != "" ] ; then
239+
docker run -v "$(pwd)":/ff ahuszagh/cross:"$TOOLCHAIN" /bin/bash -c "cd ff && ci/script.sh $TOOLCHAIN"
240+
else
241+
ci/script.sh
242+
fi

ci/script.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
TOOLCHAIN="$1"
4+
5+
mkdir build
6+
cd build
7+
8+
if [ "$TOOLCHAIN" != "" ] ; then
9+
cmake -DFASTFLOAT_TEST=ON .. -DCMAKE_TOOLCHAIN_FILE=/toolchains/"$TOOLCHAIN".cmake
10+
else
11+
cmake -DFASTFLOAT_TEST=ON ..
12+
fi
13+
make -j 2
14+
if [ "$TOOLCHAIN" != "" ] ; then
15+
qemu-"$TOOLCHAIN" tests/basictest
16+
else
17+
ctest --output-on-failure -R basictest
18+
fi

0 commit comments

Comments
 (0)