@@ -68,39 +68,52 @@ jobs:
68
68
uses : ilammy/setup-nasm@v1
69
69
70
70
71
+ - name : Setup OpenBLAS
72
+ shell : cmd
73
+ run : |
74
+ setlocal enableextensions enabledelayedexpansion
75
+
76
+ rem Determine correct architecture
77
+ if "%{matrix.platform}%"=="x64" (
78
+ set ARCH=x64
79
+ set FOLDER=win64
80
+ ) else (
81
+ set ARCH=x86
82
+ set FOLDER=win32
83
+ )
84
+
85
+ mkdir openblas
86
+ cd openblas
87
+ curl -L -o OpenBLAS.zip https://downloads.sourceforge.net/project/openblas/v0.3.24/OpenBLAS-0.3.24-%ARCH%.zip
88
+ powershell -Command "Expand-Archive -Path OpenBLAS.zip -DestinationPath ."
89
+
90
+ set "OpenBLAS_HOME=%CD%"
91
+ echo OpenBLAS_HOME=%OpenBLAS_HOME%
92
+ set "PATH=%OpenBLAS_HOME%\bin;%PATH%"
93
+
94
+ if exist %OpenBLAS_HOME%\bin\libopenblas.dll (
95
+ copy /y %OpenBLAS_HOME%\bin\libopenblas.dll %OpenBLAS_HOME%\bin\libopenblas.exp.dll
96
+ )
97
+ echo Listing OpenBLAS directory:
98
+ dir %OpenBLAS_HOME%\bin
99
+ echo Finished OpenBLAS setup
100
+ cd ..
101
+ echo set "OpenBLAS_HOME=%OpenBLAS_HOME%" > set_openblas_env.cmd
102
+
71
103
- name : Build a package
72
104
run : |
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
105
+ call set_openblas_env.cmd
106
+ python --version
107
+ python -m pip install --upgrade pip
108
+ python -m pip install --upgrade setuptools
109
+ python -m pip install cmake==3.24.2
110
+ 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
111
+
112
+ set "OpenBLAS_HOME_UNIX=%OpenBLAS_HOME:\=/%"
113
+ set "CMAKE_ARGS=-DLAPACK=ON -DOpenBLAS_INCLUDE_DIR=%OpenBLAS_HOME_UNIX%/include -DOpenBLAS_LIBRARIES=%OpenBLAS_HOME_UNIX%/lib/libopenblas.lib"
114
+ echo %CMAKE_ARGS%
115
+ dir
116
+ python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\\wheelhouse -v
104
117
shell : cmd
105
118
106
119
- name : Saving all wheels
0 commit comments