From 27510125266afa5153a94e8d4222118ef0d686c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 12:12:50 +0100 Subject: [PATCH 01/11] CI Actually use ccache in CircleCI --- build_tools/circle/build_doc.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 30a0d3fc8a9b5..a0013df9eee3f 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -174,7 +174,11 @@ bash ./miniconda.sh -b -p $MINIFORGE_PATH source $MINIFORGE_PATH/etc/profile.d/conda.sh conda activate +# Sets up ccache when using system compiler export PATH="/usr/lib/ccache:$PATH" +# Sets up ccache when using conda-forge compilers +export CC="ccache $CC" +export CXX="ccache $CXX" ccache -M 512M export CCACHE_COMPRESS=1 From afacf1f65cd7feae7b0a3c874ace7ec8c95c000e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 13:05:29 +0100 Subject: [PATCH 02/11] debug --- build_tools/circle/build_doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index a0013df9eee3f..7c132608d6ea3 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -187,7 +187,7 @@ conda activate $CONDA_ENV_NAME show_installed_libraries -pip install -e . --no-build-isolation --config-settings=compile-args="-j4" +pip install -e . --no-build-isolation --config-settings=compile-args="-j4" -v echo "ccache build summary:" ccache -s From e54e618c399f5b41ccf812e533583feadc4ae21c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 13:40:00 +0100 Subject: [PATCH 03/11] debug --- build_tools/circle/build_doc.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 7c132608d6ea3..61d50e4983aca 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +set -x # Decide what kind of documentation build to run, and run it. # @@ -174,6 +175,10 @@ bash ./miniconda.sh -b -p $MINIFORGE_PATH source $MINIFORGE_PATH/etc/profile.d/conda.sh conda activate + +create_conda_environment_from_lock_file $CONDA_ENV_NAME $LOCK_FILE +conda activate $CONDA_ENV_NAME + # Sets up ccache when using system compiler export PATH="/usr/lib/ccache:$PATH" # Sets up ccache when using conda-forge compilers @@ -182,9 +187,6 @@ export CXX="ccache $CXX" ccache -M 512M export CCACHE_COMPRESS=1 -create_conda_environment_from_lock_file $CONDA_ENV_NAME $LOCK_FILE -conda activate $CONDA_ENV_NAME - show_installed_libraries pip install -e . --no-build-isolation --config-settings=compile-args="-j4" -v From d96c7680a634c3a5efbd6fa148a5b73b95e1d369 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 13:40:49 +0100 Subject: [PATCH 04/11] comment --- build_tools/circle/build_doc.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 61d50e4983aca..837561c3800d0 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -181,7 +181,8 @@ conda activate $CONDA_ENV_NAME # Sets up ccache when using system compiler export PATH="/usr/lib/ccache:$PATH" -# Sets up ccache when using conda-forge compilers +# Sets up ccache when using conda-forge compilers (needs to be after conda +# activate which sets CC and CXX) export CC="ccache $CC" export CXX="ccache $CXX" ccache -M 512M From a31922d3284c6b7696cea2fb66d80be695e0dea7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 14:11:53 +0100 Subject: [PATCH 05/11] Is CircleCI branch actually reused in same branch? From ab505a8121f240f3a6c455bb2fcc951a0d167aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 14:21:47 +0100 Subject: [PATCH 06/11] Zeroing ccache statistics as on Azure --- build_tools/circle/build_doc.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 837561c3800d0..a0e131c846476 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -187,6 +187,8 @@ export CC="ccache $CC" export CXX="ccache $CXX" ccache -M 512M export CCACHE_COMPRESS=1 +# Zeroing statistics so that ccache statistics are shown only for this build +ccache -z show_installed_libraries From 01b5a5d13ad3667c06badd920898c7a53ed3d26b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 14:40:15 +0100 Subject: [PATCH 07/11] Trigger one more time From 1678f26df20a0b0a6e32f557d1fd481342a92561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 15:04:31 +0100 Subject: [PATCH 08/11] try -j3 --- build_tools/circle/build_doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index a0e131c846476..0a53c212d6189 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -192,7 +192,7 @@ ccache -z show_installed_libraries -pip install -e . --no-build-isolation --config-settings=compile-args="-j4" -v +time pip install -e . --no-build-isolation --config-settings=compile-args="-j3" -v echo "ccache build summary:" ccache -s From 44c9ff52a5cef8abcd730122f73b7dc4efade14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 15:29:08 +0100 Subject: [PATCH 09/11] Trigger one more time From e2cdda5f0e51bbe63d8e2b1652c6bdad5dcb1d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 15:30:18 +0100 Subject: [PATCH 10/11] try -j2 --- build_tools/circle/build_doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 0a53c212d6189..7c9bb58a57c64 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -192,7 +192,7 @@ ccache -z show_installed_libraries -time pip install -e . --no-build-isolation --config-settings=compile-args="-j3" -v +time pip install -e . --no-build-isolation --config-settings=compile-args="-j2" -v echo "ccache build summary:" ccache -s From 4d79cb9b9583a049af6c8bc4201326b36112f52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 26 Nov 2024 16:03:36 +0100 Subject: [PATCH 11/11] clean-up --- build_tools/circle/build_doc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_tools/circle/build_doc.sh b/build_tools/circle/build_doc.sh index 7c9bb58a57c64..b4f7e7640be2f 100755 --- a/build_tools/circle/build_doc.sh +++ b/build_tools/circle/build_doc.sh @@ -192,7 +192,10 @@ ccache -z show_installed_libraries -time pip install -e . --no-build-isolation --config-settings=compile-args="-j2" -v +# Specify explictly ninja -j argument because ninja does not handle cgroups v2 and +# use the same default rule as ninja (-j3 since we have 2 cores on CircleCI), see +# https://github.com/scikit-learn/scikit-learn/pull/30333 +pip install -e . --no-build-isolation --config-settings=compile-args="-j 3" echo "ccache build summary:" ccache -s