Skip to content

Commit

Permalink
Merge branch 'python-3.13' of github.com:microsoft/LightGBM into pyth…
Browse files Browse the repository at this point in the history
…on-3.13
  • Loading branch information
jameslamb committed Jan 23, 2025
2 parents bbec860 + e301d3f commit 811ee8d
Show file tree
Hide file tree
Showing 20 changed files with 1,024 additions and 556 deletions.
2 changes: 1 addition & 1 deletion .ci/conda-envs/ci-core.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ joblib>=1.3.2
matplotlib-base>=3.7.3
numpy>=1.24.4
pandas>2.0
pyarrow-core>=16.0
pyarrow-core>=6.0
python-graphviz>=0.20.3
scikit-learn>=1.3.2
scipy>=1.1
Expand Down
15 changes: 9 additions & 6 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ ARCH=$(uname -m)


if [[ $OS_NAME == "macos" ]]; then
# Check https://github.com/actions/runner-images/tree/main/images/macos for available
# versions of Xcode
macos_ver=$(sw_vers --productVersion)
if [[ "${macos_ver}" =~ 13. ]]; then
xcode_path="/Applications/Xcode_14.3.app/Contents/Developer"
else
xcode_path="/Applications/Xcode_15.0.app/Contents/Developer"
fi
sudo xcode-select -s "${xcode_path}" || exit 1
if [[ $COMPILER == "clang" ]]; then
brew install libomp
if [[ $AZURE == "true" ]]; then
sudo xcode-select -s /Applications/Xcode_13.1.0.app/Contents/Developer || exit 1
fi
else # gcc
# Check https://github.com/actions/runner-images/tree/main/images/macos for available
# versions of Xcode
sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer || exit 1
brew install 'gcc@12'
fi
if [[ $TASK == "mpi" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .ci/test-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if ($env:TASK -eq "swig") {
conda init powershell
conda activate
conda config --set always_yes yes --set changeps1 no
conda update -q -y conda "python=$env:PYTHON_VERSION=*_cp*"
conda update -q -y conda "python=$env:PYTHON_VERSION[build=*_cp*]"

if ($env:PYTHON_VERSION -eq "3.7") {
$env:CONDA_REQUIREMENT_FILE = "$env:BUILD_SOURCESDIRECTORY/.ci/conda-envs/ci-core-py37.txt"
Expand Down
7 changes: 2 additions & 5 deletions .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

set -e -E -o -u pipefail

# TODO(jameslamb): revert before merging
set -x

# defaults
CONDA_ENV="test-env"
IN_UBUNTU_BASE_CONTAINER=${IN_UBUNTU_BASE_CONTAINER:-"false"}
Expand Down Expand Up @@ -67,9 +64,9 @@ if [[ "$TASK" == "cpp-tests" ]]; then
exit 0
fi

# including python=version=*_cp* to ensure that conda prefers CPython and doesn't fall back to
# including python=version=[build=*_cp*] to ensure that conda prefers CPython and doesn't fall back to
# other implementations like pypy
CONDA_PYTHON_REQUIREMENT="python=${PYTHON_VERSION}=*_cp*"
CONDA_PYTHON_REQUIREMENT="python=${PYTHON_VERSION}[build=*_cp*]"

if [[ $TASK == "if-else" ]]; then
conda create -q -y -n "${CONDA_ENV}" "${CONDA_PYTHON_REQUIREMENT}" numpy
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CUDA Version
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master
# Run manually by clicking a button in the UI
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
6 changes: 4 additions & 2 deletions .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: 'Lock Inactive Threads'

on:
schedule:
# midnight UTC, every Wednesday
# midnight UTC, every Wednesday, for Issues
- cron: '0 0 * * 3'
# midnight UTC, every Thursday, for PRs
- cron: '0 0 * * 4'
# allow manual triggering from GitHub UI
workflow_dispatch:

Expand Down Expand Up @@ -42,4 +44,4 @@ jobs:
# what should the locking status be?
issue-lock-reason: 'resolved'
pr-lock-reason: 'resolved'
process-only: 'issues, prs'
process-only: ${{ github.event.schedule == '0 0 * * 3' && 'issues' || 'prs' }}
12 changes: 6 additions & 6 deletions .github/workflows/python_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Python-package
on:
push:
branches:
- master
- master
pull_request:
branches:
- master
- master

# automatically cancel in-progress builds if another commit is pushed
concurrency:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
runs-on: ubuntu-latest
needs: [test, test-latest-versions, test-old-versions]
steps:
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
- name: Note that all tests succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
Loading

0 comments on commit 811ee8d

Please sign in to comment.