20
20
meson :
21
21
name : Meson windows build/test
22
22
runs-on : windows-2019
23
- # if: "github.repository == 'numpy/numpy'"
23
+ if : " github.repository == 'numpy/numpy'"
24
24
steps :
25
25
- name : Checkout
26
26
uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@@ -32,14 +32,14 @@ jobs:
32
32
with :
33
33
python-version : ${{ env.PYTHON_VERSION }}
34
34
35
- - name : Install dependencies
35
+ - name : Install build dependencies from PyPI
36
36
run : |
37
- pip install -r build_requirements.txt
38
- - name : openblas-libs
37
+ pip install spin Cython
38
+
39
+ - name : Install OpenBLAS and Clang-cl
39
40
run : |
40
- # Download and install pre-built OpenBLAS library
41
- # with 32-bit interfaces
42
- # Unpack it in the pkg-config hardcoded path
41
+ # Download and install pre-built OpenBLAS library with 32-bit
42
+ # interfaces Unpack it in the pkg-config hardcoded path
43
43
choco install unzip -y
44
44
choco install wget -y
45
45
# Install llvm, which contains clang-cl
@@ -48,44 +48,35 @@ jobs:
48
48
wget https://anaconda.org/multibuild-wheels-staging/openblas-libs/v0.3.21/download/openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
49
49
unzip -d c:\opt openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
50
50
echo "PKG_CONFIG_PATH=c:\opt\64\lib\pkgconfig;" >> $env:GITHUB_ENV
51
- - name : meson-configure
52
- run : |
53
- "[binaries]","c = 'clang-cl'","cpp = 'clang-cl'","ar = 'llvm-lib'","c_ld = 'lld-link'","cpp_ld = 'lld-link'" | Out-File $PWD/clang-cl-build.ini -Encoding ascii
54
- meson setup build --prefix=$PWD\build-install --native-file=$PWD/clang-cl-build.ini -Ddebug=false --optimization 2 --vsenv
55
- - name : meson-build
56
- run : |
57
- meson compile -C build -v
58
51
59
- - name : meson-install
52
+ - name : Write native file for Clang-cl binaries
60
53
run : |
61
- cd build
62
- meson install --no-rebuild
63
- - name : build-path
54
+ # TODO: this job is identical to the one in `windows_meson.yml` aside
55
+ # from installing Clang-cl and usage of this .ini file. So merge the
56
+ # two and use a matrix'ed CI job run.
57
+ "[binaries]","c = 'clang-cl'","cpp = 'clang-cl'","ar = 'llvm-lib'","c_ld = 'lld-link'","cpp_ld = 'lld-link'" | Out-File $PWD/clang-cl-build.ini -Encoding ascii
58
+
59
+ - name : Install NumPy
64
60
run : |
65
- echo "installed_path=$PWD\build-install\Lib\site-packages" >> $env:GITHUB_ENV
66
- - name : post-install
61
+ spin build -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
62
+
63
+ - name : Copy OpenBLAS DLL, write _distributor_init.py
67
64
run : |
68
- $numpy_path = "${env:installed_path}\numpy"
65
+ # Getting the OpenBLAS DLL to the right place so it loads
66
+ $installed_path = "$PWD\build-install\usr\Lib\site-packages"
67
+ $numpy_path = "${installed_path}\numpy"
69
68
$libs_path = "${numpy_path}\.libs"
70
69
mkdir ${libs_path}
71
70
$ob_path = "C:/opt/64/bin/"
72
71
cp $ob_path/*.dll $libs_path
73
72
# Write _distributor_init.py to load .libs DLLs.
74
73
python -c "from tools import openblas_support; openblas_support.make_init(r'${numpy_path}')"
75
74
76
- - name : prep- test
75
+ - name : Install test dependencies
77
76
run : |
78
- echo "PYTHONPATH=${env:installed_path}" >> $env:GITHUB_ENV
79
77
python -m pip install -r test_requirements.txt
80
78
python -m pip install threadpoolctl
81
79
82
- - name : test
80
+ - name : Run test suite
83
81
run : |
84
- mkdir tmp
85
- cd tmp
86
- echo "============================================"
87
- python -c "import numpy; print(numpy.show_runtime())"
88
- echo "============================================"
89
- echo "LASTEXITCODE is '$LASTEXITCODE'"
90
- python -c "import numpy, sys; sys.exit(numpy.test(verbose=3) is False)"
91
- echo "LASTEXITCODE is '$LASTEXITCODE'"
82
+ spin test
0 commit comments