From 34df1f588b5ffc59aa0a34d95f12cb5db5690ba0 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Fri, 30 Apr 2021 09:02:40 +0800 Subject: [PATCH] Reduce Travis environment setup time. (#6912) * Remove unused r from travis. * Don't update homebrew. * Don't install indirect/unused dependencies like libgit2, wget, openssl. * Move graphviz installation to conda. --- .travis.yml | 12 ++---------- tests/ci_build/conda_env/macos_cpu_test.yml | 1 + tests/travis/run_test.sh | 2 -- tests/travis/setup.sh | 4 ++++ 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83bfe07c8..b073fd29d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,18 +19,10 @@ jobs: env: TASK=java_test # dependent brew packages +# the dependencies from homebrew is installed manually from setup script due to outdated image from travis. addons: homebrew: - packages: - - cmake - - libomp - - graphviz - - openssl - - libgit2 - - lz4 - - wget - - r - update: true + update: false apt: packages: - snapd diff --git a/tests/ci_build/conda_env/macos_cpu_test.yml b/tests/ci_build/conda_env/macos_cpu_test.yml index feb102ec2..6a9092b2b 100644 --- a/tests/ci_build/conda_env/macos_cpu_test.yml +++ b/tests/ci_build/conda_env/macos_cpu_test.yml @@ -15,6 +15,7 @@ dependencies: - matplotlib - dask - distributed +- graphviz - python-graphviz - hypothesis - astroid diff --git a/tests/travis/run_test.sh b/tests/travis/run_test.sh index ee38061a1..3c100e99b 100755 --- a/tests/travis/run_test.sh +++ b/tests/travis/run_test.sh @@ -1,7 +1,5 @@ #!/bin/bash -make -f dmlc-core/scripts/packages.mk lz4 - source $HOME/miniconda/bin/activate if [ ${TASK} == "python_sdist_test" ]; then diff --git a/tests/travis/setup.sh b/tests/travis/setup.sh index 5d5929d4b..3ce285ed2 100755 --- a/tests/travis/setup.sh +++ b/tests/travis/setup.sh @@ -1,5 +1,9 @@ #!/bin/bash +# https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/27 +brew install cmake libomp lz4 + + if [ ${TASK} == "python_test" ] || [ ${TASK} == "python_sdist_test" ]; then if [ ${TRAVIS_OS_NAME} == "osx" ]; then wget --no-verbose -O conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh