diff --git a/.travis.yml b/.travis.yml index 328940a165fee..456d94301d4c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,15 +18,16 @@ env: - OPENBLAS_NUM_THREADS=2 - SKLEARN_BUILD_PARALLEL=3 - SKLEARN_SKIP_NETWORK_TESTS=1 + - PYTHONUNBUFFERED=1 # Custom environment variables for the ARM wheel builder - CIBW_BUILD_VERBOSITY=1 - - CIBW_TEST_REQUIRES="pytest pytest-xdist threadpoolctl" - CIBW_TEST_COMMAND="bash {project}/build_tools/travis/test_wheels.sh" - - CIBW_ENVIRONMENT="CPU_COUNT=2 + - CIBW_ENVIRONMENT="CPU_COUNT=6 OMP_NUM_THREADS=2 OPENBLAS_NUM_THREADS=2 - SKLEARN_BUILD_PARALLEL=3 - SKLEARN_SKIP_NETWORK_TESTS=1" + SKLEARN_BUILD_PARALLEL=10 + SKLEARN_SKIP_NETWORK_TESTS=1 + PYTHONUNBUFFERED=1" jobs: include: diff --git a/build_tools/travis/install.sh b/build_tools/travis/install.sh index 1e8e2963711ef..178260c8dabcb 100644 --- a/build_tools/travis/install.sh +++ b/build_tools/travis/install.sh @@ -4,10 +4,8 @@ # defined in the ".travis.yml" file. In particular, it is # important that we call to the right installation script. -set -e - if [[ $BUILD_WHEEL == true ]]; then - source build_tools/travis/install_wheels.sh + source build_tools/travis/install_wheels.sh || travis_terminate 1 else - source build_tools/travis/install_main.sh + source build_tools/travis/install_main.sh || travis_terminate 1 fi diff --git a/build_tools/travis/install_wheels.sh b/build_tools/travis/install_wheels.sh index 4bb52f51f27f7..0f6cdf256e71b 100644 --- a/build_tools/travis/install_wheels.sh +++ b/build_tools/travis/install_wheels.sh @@ -1,6 +1,4 @@ #!/bin/bash -set -e - -python -m pip install cibuildwheel -python -m cibuildwheel --output-dir wheelhouse +python -m pip install cibuildwheel || travis_terminate $? +python -m cibuildwheel --output-dir wheelhouse || travis_terminate $? diff --git a/build_tools/travis/script.sh b/build_tools/travis/script.sh index 2b7aecb295d82..6e8b7e3deaee1 100644 --- a/build_tools/travis/script.sh +++ b/build_tools/travis/script.sh @@ -5,8 +5,6 @@ # continuous deployment jobs, we have to execute the scripts for # testing the continuous integration jobs. -set -e - if [[ $BUILD_WHEEL != true ]]; then # This trick will make Travis terminate the continuation of the pipeline bash build_tools/travis/test_script.sh || travis_terminate 1 diff --git a/build_tools/travis/test_wheels.sh b/build_tools/travis/test_wheels.sh index be2328e3d44d6..aa3d0d8c0ef1b 100644 --- a/build_tools/travis/test_wheels.sh +++ b/build_tools/travis/test_wheels.sh @@ -1,9 +1,9 @@ #!/bin/bash -set -e +pip install --upgrade pip || travis_terminate $? +pip install pytest pytest-xdist || travis_terminate $? -# Faster run of the source code tests -pytest -n $CPU_COUNT --pyargs sklearn +python -m pytest -n $CPU_COUNT --pyargs sklearn || travis_terminate $? # Test that there are no links to system libraries -python -m threadpoolctl -i sklearn +python -m threadpoolctl -i sklearn || travis_terminate $?