Skip to content

fix: use windows-2019 #7

fix: use windows-2019

fix: use windows-2019 #7

Workflow file for this run

name: lightgbm
# https://lightgbm.readthedocs.io/en/latest/Installation-Guide.html#id18
# https://github.com/microsoft/LightGBM/tree/master/python-package#build-gpu-version
on:
push:
branches:
- lightgbm
workflow_dispatch:
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: cuda-toolkit
uses: Jimver/cuda-toolkit@master
id: cuda-toolkit
with:
cuda: '12.1.1'
method: 'network'
sub-packages: '["nvcc", "visual_studio_integration"]'
# 在GITHUB_ENV中输出CUDA_PATH
- run: nvcc -V
- name: boost
uses: MarkusJx/install-boost@main
id: install-boost
with:
platform_version: 2022
boost_version: 1.73.0
# link: static
- name: echo version
run: |
echo ${{ steps.cuda-toolkit.outputs.cuda }}
echo ${{ steps.install-boost.outputs.BOOST_VER }}
- name: Configure build
run: |
# cmake -B build -S . -A x64 -DUSE_GPU=1 -DBOOST_ROOT=$BOOST_ROOT
# cmake -B build -S . -A x64 -DUSE_GPU=1 -DBOOST_ROOT=BOOST_ROOT -DOpenCL_LIBRARY="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/lib/x64/OpenCL.lib" -DOpenCL_INCLUDE_DIR="C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/include"
python -V
pip wheel lightgbm \
--config-settings=cmake.define.USE_GPU=ON \
--config-settings=cmake.define.OpenCL_INCLUDE_DIR=$CUDA_PATH/include \
--config-settings=cmake.define.Boost_ROOT=$BOOST_ROOT
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: Upload all wheel files
uses: actions/upload-artifact@v4
with:
name: lightgbm-wheels
path: '**/*lightgbm*.whl'
if-no-files-found: error