Commit | Line | Data |
---|---|---|
d79b085f | 1 | language: c |
6afa04b7 SW |
2 | os: |
3 | - linux | |
d79b085f JA |
4 | compiler: |
5 | - clang | |
6 | - gcc | |
569dccc7 | 7 | env: |
be90946e SW |
8 | matrix: |
9 | - BUILD_ARCH="x86" | |
10 | - BUILD_ARCH="x86_64" | |
569dccc7 SW |
11 | global: |
12 | - MAKEFLAGS="-j 2" | |
fa3c391d SW |
13 | matrix: |
14 | include: | |
15 | - os: osx | |
16 | compiler: clang # Workaround travis setting CC=["clang", "gcc"] | |
be90946e | 17 | env: BUILD_ARCH="x86_64" |
fa3c391d SW |
18 | # Build using the 10.12 SDK but target and run on OSX 10.11 |
19 | # - os: osx | |
20 | # compiler: clang | |
21 | # osx_image: xcode8 | |
22 | # env: SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk MACOSX_DEPLOYMENT_TARGET=10.11 | |
1a4e5190 | 23 | # Build on the latest OSX version (will eventually become obsolete) |
fa3c391d SW |
24 | - os: osx |
25 | compiler: clang | |
be90946e SW |
26 | osx_image: xcode8.3 |
27 | env: BUILD_ARCH="x86_64" | |
fa3c391d SW |
28 | exclude: |
29 | - os: osx | |
30 | compiler: gcc | |
be90946e SW |
31 | exclude: |
32 | - os: linux | |
33 | compiler: clang | |
34 | env: BUILD_ARCH="x86" # Only do the gcc x86 build to reduce clutter | |
546f51ce | 35 | before_install: |
be90946e SW |
36 | - EXTRA_CFLAGS="-Werror" |
37 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then | |
38 | pkgs=(libaio-dev libnuma-dev libz-dev librbd-dev libibverbs-dev librdmacm-dev); | |
39 | if [[ "$BUILD_ARCH" == "x86" ]]; then | |
40 | pkgs=("${pkgs[@]/%/:i386}"); | |
41 | pkgs+=(gcc-multilib); | |
42 | EXTRA_CFLAGS="${EXTRA_CFLAGS} -m32"; | |
43 | else | |
44 | pkgs+=(glusterfs-common); | |
45 | fi; | |
46 | sudo apt-get -qq update; | |
47 | sudo apt-get install --no-install-recommends -qq -y "${pkgs[@]}"; | |
48 | fi | |
a397a400 | 49 | script: |
be90946e SW |
50 | - ./configure --extra-cflags="${EXTRA_CFLAGS}" && make |
51 | - make test |