From 214ae017efee2bf6e877e9623f33b7451aeaf073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 9 May 2022 16:31:12 +0200 Subject: [PATCH 1/4] [nogil] Use docker image for nogil CI --- azure-pipelines.yml | 3 ++- build_tools/azure/install.sh | 17 ----------------- build_tools/azure/posix-docker.yml | 2 +- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 020d007acc651..df5ea37bade9b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -71,7 +71,7 @@ jobs: # Here we make sure, that they are still run on a regular basis. SKLEARN_SKIP_NETWORK_TESTS: '0' -- template: build_tools/azure/posix.yml +- template: build_tools/azure/posix-docker.yml # Experimental CPython branch without the Global Interpreter Lock: # https://github.com/colesbury/nogil/ # @@ -103,6 +103,7 @@ jobs: matrix: pylatest_pip_nogil: DISTRIB: 'pip-nogil' + DOCKER_CONTAINER: 'nogil/python' COVERAGE: 'false' # Check compilation with intel C++ compiler (ICC) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index cfc563a4f9f65..461201a110977 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -58,12 +58,6 @@ pre_python_environment_install() { apt-get -yq update apt-get -yq install build-essential - elif [[ "$DISTRIB" == "pip-nogil" ]]; then - echo "deb-src http://archive.ubuntu.com/ubuntu/ focal main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -yq update - sudo apt-get install -yq ccache - sudo apt-get build-dep -yq python3 python3-dev - elif [[ "$BUILD_WITH_ICC" == "true" ]]; then wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB @@ -139,17 +133,6 @@ python_environment_install() { pip install https://github.com/python-pillow/Pillow/archive/main.zip elif [[ "$DISTRIB" == "pip-nogil" ]]; then - setup_ccache # speed-up the build of CPython it-self - ORIGINAL_FOLDER=`pwd` - cd .. - git clone --depth 1 https://github.com/colesbury/nogil - cd nogil - ./configure && make -j 2 - ./python -m venv $ORIGINAL_FOLDER/$VIRTUALENV - cd $ORIGINAL_FOLDER - source $VIRTUALENV/bin/activate - - python -m pip install -U pip # The pip version that comes with the nogil branch of CPython # automatically uses the custom nogil index as its highest priority # index to fetch patched versions of libraries with native code that diff --git a/build_tools/azure/posix-docker.yml b/build_tools/azure/posix-docker.yml index 890731ffb5b0d..3b305ab768de0 100644 --- a/build_tools/azure/posix-docker.yml +++ b/build_tools/azure/posix-docker.yml @@ -27,7 +27,7 @@ jobs: PYAMG_VERSION: 'latest' PILLOW_VERSION: 'latest' MATPLOTLIB_VERSION: 'latest' - PYTEST_VERSION: 'latest' + PYTEST_VERSION: '6.2.5' PYTEST_XDIST_VERSION: 'latest' THREADPOOLCTL_VERSION: 'latest' COVERAGE: 'false' From 4901e4bf6a1c4eb76bba5e526cac85e4a50883b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 9 May 2022 16:53:06 +0200 Subject: [PATCH 2/4] [nogil] install ccache --- build_tools/azure/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 461201a110977..818f294fc281b 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -58,6 +58,11 @@ pre_python_environment_install() { apt-get -yq update apt-get -yq install build-essential + elif [[ "$DISTRIB" == "pip-nogil" ]]; then + echo "deb-src http://archive.ubuntu.com/ubuntu/ focal main" | sudo tee -a /etc/apt/sources.list + sudo apt-get -yq update + sudo apt-get install -yq ccache + elif [[ "$BUILD_WITH_ICC" == "true" ]]; then wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB From 37fb8674ee24c563187aea99b2b1e97504128337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 9 May 2022 17:28:19 +0200 Subject: [PATCH 3/4] [nogil] fix --- build_tools/azure/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 818f294fc281b..18f3560ef7ab2 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -59,9 +59,8 @@ pre_python_environment_install() { apt-get -yq install build-essential elif [[ "$DISTRIB" == "pip-nogil" ]]; then - echo "deb-src http://archive.ubuntu.com/ubuntu/ focal main" | sudo tee -a /etc/apt/sources.list - sudo apt-get -yq update - sudo apt-get install -yq ccache + apt-get -yq update + apt-get install -yq ccache elif [[ "$BUILD_WITH_ICC" == "true" ]]; then wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB From f18057cc33e135233f48ad07a378133290a3a4bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 9 May 2022 18:08:45 +0200 Subject: [PATCH 4/4] [nogil] trigger CI