Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
24 changes: 3 additions & 21 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,37 +22,19 @@ jobs:
with:
python-version: "3.11"

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install uv

- name: Cache vcpkg
if: runner.os == 'Windows'
uses: actions/cache@v4
with:
path: C:\\vcpkg\\installed
key: vcpkg-openblas-${{ runner.os }}
key: vcpkg-openblas-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
vcpkg-openblas-${{ runner.os }}-

- name: Install cibuildwheel
run: python -m pip install --upgrade pip cibuildwheel

- name: Build wheels
env:
CIBW_ENVIRONMENT_MACOS: EASYSBA_USE_ACCELERATE=1 EASYSBA_LAPACK_LIBS=
CIBW_BEFORE_ALL_WINDOWS: >-
if not exist C:\vcpkg\vcpkg.exe (
git clone https://github.com/microsoft/vcpkg.git C:\vcpkg &&
C:\vcpkg\bootstrap-vcpkg.bat -disableMetrics
) &&
C:\vcpkg\vcpkg.exe install openblas:x64-windows
CIBW_ENVIRONMENT_WINDOWS: |
EASYSBA_LAPACK_LIBS=openblas
EASYSBA_INCLUDE_DIRS=C:\\vcpkg\\installed\\x64-windows\\include
EASYSBA_LIBRARY_DIRS=C:\\vcpkg\\installed\\x64-windows\\lib
INCLUDE=C:\\vcpkg\\installed\\x64-windows\\include
LIB=C:\\vcpkg\\installed\\x64-windows\\lib
PATH=C:\\vcpkg\\installed\\x64-windows\\bin;{PATH}
run: python -m cibuildwheel --output-dir wheelhouse

- name: Upload wheels
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@ before-all = "yum -y install openblas-devel lapack-devel"
[tool.cibuildwheel.macos]
environment = { EASYSBA_USE_ACCELERATE = "1", EASYSBA_LAPACK_LIBS = "" }

# Windows configuration: Uses vcpkg to install OpenBLAS
# The before-all command:
# 1. Checks if vcpkg is already installed at C:\vcpkg
# 2. If not, clones and bootstraps vcpkg
# 3. Installs openblas for x64-windows architecture
# The environment variables point to the vcpkg installation paths for includes and libraries
[tool.cibuildwheel.windows]
environment = { EASYSBA_LAPACK_LIBS = "openblas" }
before-all = "powershell -Command \"if (!(Test-Path C:\\vcpkg\\vcpkg.exe)) { git clone https://github.com/microsoft/vcpkg.git C:\\vcpkg; C:\\vcpkg\\bootstrap-vcpkg.bat -disableMetrics }; C:\\vcpkg\\vcpkg.exe install openblas:x64-windows\""
environment = { EASYSBA_LAPACK_LIBS = "openblas", EASYSBA_INCLUDE_DIRS = "C:\\vcpkg\\installed\\x64-windows\\include", EASYSBA_LIBRARY_DIRS = "C:\\vcpkg\\installed\\x64-windows\\lib" }
Loading