@@ -67,52 +67,40 @@ jobs:
6767 - name : Setup NASM
6868 uses : ilammy/setup-nasm@v1
6969
70- - name : Setup OpenBLAS
71- shell : cmd
72- run : |
73- setlocal enableextensions enabledelayedexpansion
74-
75- rem Determine correct architecture
76- if "%{matrix.platform}%"=="x64" (
77- set ARCH=x64
78- set FOLDER=win64
79- ) else (
80- set ARCH=x86
81- set FOLDER=win32
82- )
83-
84- mkdir openblas
85- cd openblas
86- curl -L -o OpenBLAS.zip https://downloads.sourceforge.net/project/openblas/v0.3.24/OpenBLAS-0.3.24-%ARCH%.zip
87- powershell -Command "Expand-Archive -Path OpenBLAS.zip -DestinationPath ."
88-
89- set "OpenBLAS_HOME=%CD%"
90- echo OpenBLAS_HOME=%OpenBLAS_HOME%
91- set "PATH=%OpenBLAS_HOME%\bin;%PATH%"
92-
93- if exist %OpenBLAS_HOME%\bin\libopenblas.dll (
94- copy /y %OpenBLAS_HOME%\bin\libopenblas.dll %OpenBLAS_HOME%\bin\libopenblas.exp.dll
95- )
96- echo Listing OpenBLAS directory:
97- dir %OpenBLAS_HOME%\bin
98- echo Finished OpenBLAS setup
99- cd ..
100- echo set "OpenBLAS_HOME=%OpenBLAS_HOME%" > set_openblas_env.cmd
10170
10271 - name : Build a package
10372 run : |
104- call set_openblas_env.cmd
105- python --version
106- python -m pip install --upgrade pip
107- python -m pip install --upgrade setuptools
108- python -m pip install cmake==3.24.2
109- python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
110-
111- set "OpenBLAS_HOME_UNIX=%OpenBLAS_HOME:\=/%"
112- set "CMAKE_ARGS=-DLAPACK=ON -DOpenBLAS_INCLUDE_DIR=%OpenBLAS_HOME_UNIX%/include -DOpenBLAS_LIBRARIES=%OpenBLAS_HOME_UNIX%/lib/libopenblas.lib"
113- echo %CMAKE_ARGS%
114-
115- python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\\wheelhouse -v
73+ rem ==== Setup OpenBLAS ====
74+ if "%{matrix.platform}%"=="x64" (
75+ set ARCH=x64
76+ ) else (
77+ set ARCH=x86
78+ )
79+ mkdir openblas
80+ cd openblas
81+ curl -L -o OpenBLAS.zip https://downloads.sourceforge.net/project/openblas/v0.3.24/OpenBLAS-0.3.24-%ARCH%.zip
82+ powershell -Command "Expand-Archive -Path OpenBLAS.zip -DestinationPath ."
83+ set "OpenBLAS_HOME=%CD%"
84+ set "PATH=%OpenBLAS_HOME%\bin;%PATH%"
85+ if exist %OpenBLAS_HOME%\bin\libopenblas.dll (
86+ copy /y %OpenBLAS_HOME%\bin\libopenblas.dll %OpenBLAS_HOME%\bin\libopenblas.exp.dll
87+ )
88+ cd ..
89+
90+ rem ==== Install build dependencies ====
91+ python --version
92+ python -m pip install --upgrade pip
93+ python -m pip install --upgrade setuptools
94+ python -m pip install cmake==3.24.2
95+ python -m pip install toml
96+ python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt
97+ python -m pip install -r requirements.txt
98+
99+ rem ==== Build ====
100+ set "OpenBLAS_HOME_UNIX=%OpenBLAS_HOME:\=/%"
101+ set "CMAKE_ARGS=-DLAPACK=ON -DOpenBLAS_INCLUDE_DIR=%OpenBLAS_HOME_UNIX%/include -DOpenBLAS_LIBRARIES=%OpenBLAS_HOME_UNIX%/lib/libopenblas.lib"
102+ echo %CMAKE_ARGS%
103+ python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\\wheelhouse -v
116104 shell : cmd
117105
118106 - name : Saving all wheels
0 commit comments