Skip to content

[ci] fix CUDA 11.8 builds (fixes #6466) #6465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove even more --user
  • Loading branch information
jameslamb committed May 27, 2024
commit 991ba9e42c9aa4e47bb30b33359a2c2194f076a0
43 changes: 43 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: 4.3.0.99.{build}

image: Visual Studio 2015
platform: x64
configuration: # a trick to construct a build matrix with multiple Python versions
- '3.8'

# only build pull requests and
# commits to 'master' or any branch starting with 'release'
branches:
only:
- master
- /^release/

environment:
matrix:
- COMPILER: MSVC
TASK: python
# - COMPILER: MINGW
# TASK: python

clone_depth: 5

install:
- git submodule update --init --recursive # get `external_libs` folder
- set PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
- set PYTHON_VERSION=%CONFIGURATION%
- set CONDA_ENV="test-env"
- ps: |
$env:CMAKE_BUILD_PARALLEL_LEVEL = 4
$env:MINICONDA = "C:\Miniconda3-x64"
$env:PATH = "$env:MINICONDA;$env:MINICONDA\Scripts;$env:PATH"
$env:BUILD_SOURCESDIRECTORY = "$env:APPVEYOR_BUILD_FOLDER"

build: false

test_script:
- conda config --remove channels defaults
- conda config --add channels nodefaults
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda init powershell
- powershell.exe -ExecutionPolicy Bypass -File %APPVEYOR_BUILD_FOLDER%\.ci\test_windows.ps1
2 changes: 0 additions & 2 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

set -e -E -u -o pipefail

set -x

# defaults
AZURE=${AZURE:-"false"}
IN_UBUNTU_BASE_CONTAINER=${IN_UBUNTU_BASE_CONTAINER:-"false"}
Expand Down
26 changes: 7 additions & 19 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ if [[ $TASK == "check-docs" ]] || [[ $TASK == "check-links" ]]; then
make html || exit 1
if [[ $TASK == "check-links" ]]; then
# check docs for broken links
pip install --user linkchecker
pip install linkchecker
linkchecker --config=.linkcheckerrc ./_build/html/*.html || exit 1
exit 0
fi
Expand Down Expand Up @@ -192,16 +192,6 @@ pip uninstall --yes \

cd $BUILD_DIRECTORY

echo "--- finding libomp.so (/usr) ..."
find /usr -type f -name 'libomp.so.*' || true
find /usr -type f -name 'libgomp.so.*' || true
echo "--- finding libomp.so (${HOME}) ..."
find "${HOME}" -type f -name 'libomp.so.*' || true
find "${HOME}" -type f -name 'libgomp.so.*' || true
echo "--- finding libomp.so (${CONDA}) ..."
find "${CONDA}" -type f -name 'libomp.so.*' || true
find "${CONDA}" -type f -name 'libgomp.so.*' || true

if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "clang" ]]; then
# fix "OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized." (OpenMP library conflict due to conda's MKL)
for LIBOMP_ALIAS in libgomp.dylib libiomp5.dylib libomp.dylib; do sudo ln -sf "$(brew --cellar libomp)"/*/lib/libomp.dylib $CONDA_PREFIX/lib/$LIBOMP_ALIAS || exit 1; done
Expand All @@ -210,7 +200,7 @@ fi
if [[ $TASK == "sdist" ]]; then
cd $BUILD_DIRECTORY && sh ./build-python.sh sdist || exit 1
sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1
pip install --user $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER.tar.gz -v || exit 1
pip install $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER.tar.gz -v || exit 1
if [[ $PRODUCES_ARTIFACTS == "true" ]]; then
cp $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER.tar.gz $BUILD_ARTIFACTSTAGINGDIRECTORY || exit 1
fi
Expand Down Expand Up @@ -255,7 +245,7 @@ elif [[ $TASK == "bdist" ]]; then
# Make sure we can do both CPU and GPU; see tests/python_package_test/test_dual.py
export LIGHTGBM_TEST_DUAL_CPU_GPU=1
fi
pip install --user $BUILD_DIRECTORY/dist/*.whl || exit 1
pip install $BUILD_DIRECTORY/dist/*.whl || exit 1
pytest $BUILD_DIRECTORY/tests || exit 1
exit 0
fi
Expand All @@ -267,8 +257,7 @@ if [[ $TASK == "gpu" ]]; then
cd $BUILD_DIRECTORY && sh ./build-python.sh sdist || exit 1
sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1
pip install \
--user \
-vvv \
-v \
--config-settings=cmake.define.USE_GPU=ON \
$BUILD_DIRECTORY/dist/lightgbm-$LGB_VER.tar.gz \
|| exit 1
Expand All @@ -277,7 +266,7 @@ if [[ $TASK == "gpu" ]]; then
elif [[ $METHOD == "wheel" ]]; then
cd $BUILD_DIRECTORY && sh ./build-python.sh bdist_wheel --gpu || exit 1
sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1
pip install --user $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER*.whl -vvv || exit 1
pip install -v $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER*.whl || exit 1
pytest $BUILD_DIRECTORY/tests || exit 1
exit 0
elif [[ $METHOD == "source" ]]; then
Expand Down Expand Up @@ -323,7 +312,6 @@ elif [[ $TASK == "mpi" ]]; then
cd $BUILD_DIRECTORY && sh ./build-python.sh sdist || exit 1
sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1
pip install \
--user \
-v \
--config-settings=cmake.define.USE_MPI=ON \
$BUILD_DIRECTORY/dist/lightgbm-$LGB_VER.tar.gz \
Expand All @@ -333,7 +321,7 @@ elif [[ $TASK == "mpi" ]]; then
elif [[ $METHOD == "wheel" ]]; then
cd $BUILD_DIRECTORY && sh ./build-python.sh bdist_wheel --mpi || exit 1
sh $BUILD_DIRECTORY/.ci/check_python_dists.sh $BUILD_DIRECTORY/dist || exit 1
pip install --user $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER*.whl -v || exit 1
pip install -v $BUILD_DIRECTORY/dist/lightgbm-$LGB_VER*.whl || exit 1
pytest $BUILD_DIRECTORY/tests || exit 1
exit 0
elif [[ $METHOD == "source" ]]; then
Expand All @@ -345,7 +333,7 @@ fi

cmake --build build --target _lightgbm -j4 || exit 1

cd $BUILD_DIRECTORY && sh ./build-python.sh install --precompile --user || exit 1
cd $BUILD_DIRECTORY && sh ./build-python.sh install --precompile || exit 1
pytest $BUILD_DIRECTORY/tests/python_package_test/test_basic.py || exit 1
exit 0

Expand Down
2 changes: 1 addition & 1 deletion .ci/test_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ elseif ($env:TASK -eq "bdist") {
cd $env:BUILD_SOURCESDIRECTORY
sh "build-python.sh" bdist_wheel --integrated-opencl ; Check-Output $?
sh $env:BUILD_SOURCESDIRECTORY/.ci/check_python_dists.sh $env:BUILD_SOURCESDIRECTORY/dist ; Check-Output $?
cd dist; pip install --user @(Get-ChildItem *py3-none-win_amd64.whl) ; Check-Output $?
cd dist; pip install @(Get-ChildItem *py3-none-win_amd64.whl) ; Check-Output $?
cp @(Get-ChildItem *py3-none-win_amd64.whl) $env:BUILD_ARTIFACTSTAGINGDIRECTORY
} elseif (($env:APPVEYOR -eq "true") -and ($env:TASK -eq "python")) {
cd $env:BUILD_SOURCESDIRECTORY
Expand Down
2 changes: 1 addition & 1 deletion python-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ninja.make-fallback = true
cmake.args = [
"-D__BUILD_FOR_PYTHON:BOOL=ON"
]
cmake.verbose = true
cmake.verbose = false
cmake.build-type = "Release"
cmake.targets = ["_lightgbm"]
# stripping binaries should be turned back on once this is fixed:
Expand Down