Skip to content

Commit

Permalink
CI: use MSVC instead msbuild to remove 'visual_stuido_integration' de…
Browse files Browse the repository at this point in the history
…pendency

 * use Ninja to compile without MS toolset
  • Loading branch information
wkpark committed Feb 8, 2024
1 parent 3465f69 commit f643669
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ jobs:
uses: jwlawson/[email protected]
with:
cmake-version: '3.26.x'
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: ${{ startsWith(matrix.os, 'windows') }}
- name: Setup MSVC
if: startsWith(matrix.os, 'windows')
#uses: microsoft/[email protected] # to use msbuild
uses: ilammy/[email protected] # to use cl
# Compile C++ code
- name: Build C++
shell: bash
Expand All @@ -60,11 +61,7 @@ jobs:
else
cmake -DCOMPUTE_BACKEND=cpu .
fi
if [ ${build_os:0:7} == windows ]; then
pwsh -Command "msbuild bitsandbytes.vcxproj /property:Configuration=Release"
else
make
fi
cmake --build . --config Release
mkdir -p output/${{ matrix.os }}/${{ matrix.arch }}
( shopt -s nullglob && cp bitsandbytes/*.{so,dylib,dll} output/${{ matrix.os }}/${{ matrix.arch }}/ )
- name: Upload build artifact
Expand Down Expand Up @@ -109,9 +106,10 @@ jobs:
sub-packages: '["nvcc","cudart","cusparse","cublas","thrust","nvrtc_dev","cublas_dev","cusparse_dev"]'
linux-local-args: '["--toolkit"]'
use-github-cache: false
- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: ${{ startsWith(matrix.os, 'windows') }}
- name: Setup MSVC
if: startsWith(matrix.os, 'windows')
#uses: microsoft/[email protected] # to use msbuild
uses: ilammy/[email protected] # to use cl
# Compile C++ code
- name: Build C++
shell: bash
Expand All @@ -127,10 +125,11 @@ jobs:
"apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake \
&& cmake -DCOMPUTE_BACKEND=cuda -DNO_CUBLASLT=${NO_CUBLASLT} . \
&& make"
&& cmake --build ."
else
cmake -DCOMPUTE_BACKEND=cuda -DNO_CUBLASLT=${NO_CUBLASLT} .
pwsh -Command "msbuild bitsandbytes.vcxproj /property:Configuration=Release"
python3 -m pip install cmake==3.27.9 ninja
cmake -G Ninja -DCOMPUTE_BACKEND=cuda -DNO_CUBLASLT=${NO_CUBLASLT} -DCMAKE_BUILD_TYPE=Release -S .
cmake --build . --config Release
fi
done
mkdir -p output/${{ matrix.os }}/${{ matrix.arch }}
Expand Down

0 comments on commit f643669

Please sign in to comment.