From ddc72a63845cf718af7fd79876bf97d7af97e5ce Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 13:22:56 +0300 Subject: [PATCH 1/8] Do not call pip build wheel as it copies all the files to the tmp dir. Instead, call the setup.py directly --- travis_config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis_config.sh b/travis_config.sh index 9ba0bb11..e49135d6 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -14,7 +14,7 @@ function bdist_wheel_cmd { # copied from multibuild's common_utils.sh # add osx deployment target so it doesnt default to 10.6 local abs_wheelhouse=$1 - CI_BUILD=1 pip wheel --verbose --wheel-dir="$PWD/dist" . $BDIST_PARAMS + CI_BUILD=1 python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS cp dist/*.whl $abs_wheelhouse if [ -z "$IS_OSX" ]; then TOOLS_PATH=/opt/_internal/tools @@ -116,7 +116,7 @@ function pre_build { fi # echo 'Installing qt5' - + # if [ -n "$CACHE_STAGE" ]; then # echo "Qt5 has bottle, no caching needed" # else From 9c87411756af75de6b11c2b0bb2748a90cc126a1 Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 14:57:34 +0300 Subject: [PATCH 2/8] Install build dependencies as setup.py does not install them automatically from pyproject.toml --- travis_config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/travis_config.sh b/travis_config.sh index e49135d6..17e0c223 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -14,6 +14,7 @@ function bdist_wheel_cmd { # copied from multibuild's common_utils.sh # add osx deployment target so it doesnt default to 10.6 local abs_wheelhouse=$1 + pip3 install --upgrade scikit-build setuptools wheel cmake pip CI_BUILD=1 python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS cp dist/*.whl $abs_wheelhouse if [ -z "$IS_OSX" ]; then From 8d50f9d15618c55b0c1dba8db361d1b688191b62 Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 15:59:05 +0300 Subject: [PATCH 3/8] Do not print compiler warnings --- travis_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis_config.sh b/travis_config.sh index 17e0c223..d2044c8e 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -15,7 +15,7 @@ function bdist_wheel_cmd { # add osx deployment target so it doesnt default to 10.6 local abs_wheelhouse=$1 pip3 install --upgrade scikit-build setuptools wheel cmake pip - CI_BUILD=1 python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS + CI_BUILD=1 CXXFLAGS="-w" python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS cp dist/*.whl $abs_wheelhouse if [ -z "$IS_OSX" ]; then TOOLS_PATH=/opt/_internal/tools From 6501e39db9a4ed1f7a7c5d8f2b54bc61a16239ee Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 17:12:42 +0300 Subject: [PATCH 4/8] Add missed numpy --- travis_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis_config.sh b/travis_config.sh index d2044c8e..e869e069 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -14,7 +14,7 @@ function bdist_wheel_cmd { # copied from multibuild's common_utils.sh # add osx deployment target so it doesnt default to 10.6 local abs_wheelhouse=$1 - pip3 install --upgrade scikit-build setuptools wheel cmake pip + pip3 install --upgrade scikit-build setuptools wheel cmake pip numpy CI_BUILD=1 CXXFLAGS="-w" python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS cp dist/*.whl $abs_wheelhouse if [ -z "$IS_OSX" ]; then From e073641608227c6515d4fe5872c391b6bb2b7a6f Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 18:04:34 +0300 Subject: [PATCH 5/8] Switch osx build to ninja --- setup.py | 2 +- travis_config.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 67f22c60..e5874bdd 100644 --- a/setup.py +++ b/setup.py @@ -117,7 +117,7 @@ def main(): ci_cmake_generator = ( ["-G", "Visual Studio 14" + (" Win64" if x64 else "")] if os.name == "nt" - else ["-G", "Unix Makefiles"] + else ["-G", "Ninja"] ) cmake_args = ( diff --git a/travis_config.sh b/travis_config.sh index e869e069..78d0d266 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -114,6 +114,7 @@ function pre_build { brew unlink python@2 generate_ffmpeg_formula brew install ffmpeg_opencv + brew install ninja fi # echo 'Installing qt5' From 1f6d21bc5d4dbf421ad8e502efe9a12ff4e1c13f Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 19:36:55 +0300 Subject: [PATCH 6/8] Install exactly the same version of the pip as tests use --- travis_config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis_config.sh b/travis_config.sh index 78d0d266..cc18a718 100644 --- a/travis_config.sh +++ b/travis_config.sh @@ -14,7 +14,7 @@ function bdist_wheel_cmd { # copied from multibuild's common_utils.sh # add osx deployment target so it doesnt default to 10.6 local abs_wheelhouse=$1 - pip3 install --upgrade scikit-build setuptools wheel cmake pip numpy + pip3 install --upgrade scikit-build setuptools wheel cmake pip ${TEST_DEPENDS} CI_BUILD=1 CXXFLAGS="-w" python3 setup.py --verbose bdist_wheel --dist-dir="$PWD/dist" $BDIST_PARAMS cp dist/*.whl $abs_wheelhouse if [ -z "$IS_OSX" ]; then From cac29e3ca02664fd6478dcf05e04e033e3798502 Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 20:41:50 +0300 Subject: [PATCH 7/8] Use shared cache name for all osx builds --- .travis.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3c2efde8..366a624b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,6 +85,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.13.3 + - CACHE_NAME=osx - os: osx language: generic @@ -94,6 +95,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.14.5 + - CACHE_NAME=osx - os: osx language: generic @@ -103,6 +105,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.17.3 + - CACHE_NAME=osx - os: osx language: generic @@ -112,6 +115,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.19.3 + - CACHE_NAME=osx # headless builds for MacOS @@ -123,6 +127,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.13.3 + - CACHE_NAME=osx - os: osx language: generic @@ -132,6 +137,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.14.5 + - CACHE_NAME=osx - os: osx language: generic @@ -141,6 +147,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.17.3 + - CACHE_NAME=osx - os: osx language: generic @@ -150,6 +157,7 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.19.3 + - CACHE_NAME=osx # Contrib builds for MacOS @@ -161,6 +169,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.13.3 + - CACHE_NAME=osx - os: osx language: generic @@ -170,6 +179,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.14.5 + - CACHE_NAME=osx - os: osx language: generic @@ -179,6 +189,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.17.3 + - CACHE_NAME=osx - os: osx language: generic @@ -188,6 +199,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.19.3 + - CACHE_NAME=osx # headless contrib builds for MacOS @@ -199,6 +211,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.13.3 + - CACHE_NAME=osx - os: osx language: generic @@ -208,6 +221,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.14.5 + - CACHE_NAME=osx - os: osx language: generic @@ -217,6 +231,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.17.3 + - CACHE_NAME=osx - os: osx language: generic @@ -226,6 +241,7 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.19.3 + - CACHE_NAME=osx # default builds for Linux From dcefc704356d960de93d8269b8a29ea0e80493d6 Mon Sep 17 00:00:00 2001 From: Grigory Serebryakov Date: Tue, 19 Jan 2021 21:49:49 +0300 Subject: [PATCH 8/8] Rollback cache name change - it is not needed, as it is not used in our case according to the documentation https://docs.travis-ci.com/user/caching/\#caches-and-build-matrices and this comment: https://github.com/travis-ci/docs-travis-ci-com/issues/887 --- .travis.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 366a624b..3c2efde8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -85,7 +85,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.13.3 - - CACHE_NAME=osx - os: osx language: generic @@ -95,7 +94,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.14.5 - - CACHE_NAME=osx - os: osx language: generic @@ -105,7 +103,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.17.3 - - CACHE_NAME=osx - os: osx language: generic @@ -115,7 +112,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.19.3 - - CACHE_NAME=osx # headless builds for MacOS @@ -127,7 +123,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.13.3 - - CACHE_NAME=osx - os: osx language: generic @@ -137,7 +132,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.14.5 - - CACHE_NAME=osx - os: osx language: generic @@ -147,7 +141,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.17.3 - - CACHE_NAME=osx - os: osx language: generic @@ -157,7 +150,6 @@ jobs: - ENABLE_CONTRIB=0 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.19.3 - - CACHE_NAME=osx # Contrib builds for MacOS @@ -169,7 +161,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.13.3 - - CACHE_NAME=osx - os: osx language: generic @@ -179,7 +170,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.14.5 - - CACHE_NAME=osx - os: osx language: generic @@ -189,7 +179,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.17.3 - - CACHE_NAME=osx - os: osx language: generic @@ -199,7 +188,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=0 - TEST_DEPENDS=numpy==1.19.3 - - CACHE_NAME=osx # headless contrib builds for MacOS @@ -211,7 +199,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.13.3 - - CACHE_NAME=osx - os: osx language: generic @@ -221,7 +208,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.14.5 - - CACHE_NAME=osx - os: osx language: generic @@ -231,7 +217,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.17.3 - - CACHE_NAME=osx - os: osx language: generic @@ -241,7 +226,6 @@ jobs: - ENABLE_CONTRIB=1 - ENABLE_HEADLESS=1 - TEST_DEPENDS=numpy==1.19.3 - - CACHE_NAME=osx # default builds for Linux