Merge branch 'master' of https://github.com/celestinechen/fio
[fio.git] / .travis.yml
1 language: c
2 dist: bionic
3 os:
4   - linux
5 compiler:
6   - clang
7   - gcc
8 env:
9   matrix:
10     - BUILD_ARCH="x86"
11     - BUILD_ARCH="x86_64"
12   global:
13     - MAKEFLAGS="-j 2"
14 matrix:
15   include:
16     # Default xcode image
17     - os: osx
18       compiler: clang # Workaround travis setting CC=["clang", "gcc"]
19       env: BUILD_ARCH="x86_64"
20     # Latest xcode image (needs periodic updating)
21     - os: osx
22       compiler: clang
23       osx_image: xcode11.2
24       env: BUILD_ARCH="x86_64"
25   exclude:
26     - os: osx
27       compiler: gcc
28   exclude:
29     - os: linux
30       compiler: clang
31       env: BUILD_ARCH="x86" # Only do the gcc x86 build to reduce clutter
32 before_install:
33   - EXTRA_CFLAGS="-Werror"
34   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
35         pkgs=(libaio-dev libcunit1 libcunit1-dev libgoogle-perftools4 libibverbs-dev libiscsi-dev libnuma-dev librbd-dev librdmacm-dev libz-dev);
36         if [[ "$BUILD_ARCH" == "x86" ]]; then
37             pkgs=("${pkgs[@]/%/:i386}");
38             pkgs+=(gcc-multilib python-scipy);
39             EXTRA_CFLAGS="${EXTRA_CFLAGS} -m32";
40         else
41             pkgs+=(glusterfs-common python-scipy);
42         fi;
43         sudo apt-get -qq update;
44         sudo apt-get install --no-install-recommends -qq -y "${pkgs[@]}";
45     fi;
46   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
47         brew update;
48         brew install cunit;
49         if [[ "$TRAVIS_OSX_IMAGE" == "xcode11.2" ]]; then
50             pip3 install scipy;
51         else
52             pip install scipy;
53         fi;
54     fi;
55 script:
56   - ./configure --extra-cflags="${EXTRA_CFLAGS}" && make
57   - make test
58   - sudo python3 t/run-fio-tests.py --skip 6 1007 1008 --debug