travis_osx_steps.sh 1.09 KB
Newer Older
1
#!/bin/bash
2
# Wheel build, install, run test steps on OSX
3
4
5
set -e

# Get needed utilities
6
MULTIBUILD_DIR=$(dirname "${BASH_SOURCE[0]}")
7
MB_PYTHON_VERSION=${MB_PYTHON_VERSION:-$TRAVIS_PYTHON_VERSION}
8
# These load common_utils.sh
Matthew Brett's avatar
Matthew Brett committed
9
source $MULTIBUILD_DIR/osx_utils.sh
10
source $MULTIBUILD_DIR/library_builders.sh
11

12
13
# NB - config.sh sourced at end of this function.
# config.sh can override any function defined here.
14
15

function before_install {
xoviat's avatar
xoviat committed
16
17
18
19
20
21
22
23
24
25
    if [ $USE_CCACHE == 1 ]; then
        brew install ccache
        export PATH=/usr/local/opt/ccache/libexec:$PATH
        export CCACHE_MAXSIZE=200M
        export CCACHE_CPP2=1
        
        # Prove to the developer that ccache is activated
        which clang
    fi

26
27
    export CC=clang
    export CXX=clang++
28
    get_macpython_environment $MB_PYTHON_VERSION venv
29
30
31
32
    source venv/bin/activate
    pip install --upgrade pip wheel
}

33
# build_wheel function defined in common_utils (via osx_utils)
34
# install_run function defined in common_utils
35
36

# Local configuration may define custom pre-build, source patching.
37
38
# It can also overwrite the functions above.
source config.sh