1
1
name : BLAS tests (Linux)
2
2
3
+ # This file is meant for testing different BLAS/LAPACK flavors and build
4
+ # options on Linux. All other yml files for Linux will only test without BLAS
5
+ # (mostly because that's easier and faster to build) or with the same 64-bit
6
+ # OpenBLAS build that is used in the wheel jobs.
7
+
8000
span>#
8
+ # Jobs and their purpose:
9
+ #
10
+ # - openblas64_setuppy:
11
+ # This job uses the default 64-bit build of OpenBLAS with the
12
+ # `numpy.distutils`-based build. It can be removed once we remove
13
+ # support for those builds.
14
+ # - openblas32_stable_nightly:
15
+ # Uses the 32-bit OpenBLAS builds, both the latest stable release and a
16
+ # nightly build.
17
+ #
18
+ # TODO: coverage here is limited, we should add non-OpenBLAS libraries and
19
+ # exercise the BLAS-related build options (see `meson_options.txt`).
20
+
3
21
on :
4
22
pull_request :
5
23
branches :
@@ -18,9 +36,9 @@ permissions:
18
36
contents : read # to fetch code (actions/checkout)
19
37
20
38
jobs :
21
- openblas64 :
39
+ openblas64_setuppy :
22
40
runs-on : ubuntu-latest
23
- if : github.event_name != 'push'
41
+ if : " github.repository == 'numpy/numpy' "
24
42
env :
25
43
DOWNLOAD_OPENBLAS : 1
26
44
NPY_USE_BLAS_ILP64 : 1
34
52
python-version : ' 3.11'
35
53
- uses : ./.github/actions
36
54
55
+ openblas32_stable_nightly :
56
+ if : " github.repository == 'numpy/numpy'"
57
+ runs-on : ubuntu-latest
58
+ strategy :
59
+ matrix :
60
+ USE_NIGHTLY_OPENBLAS : [false, true]
61
+ env :
62
+ USE_NIGHTLY_OPENBLAS : ${{ matrix.USE_NIGHTLY_OPENBLAS }}
63
+ name : " Test Linux (${{ matrix.USE_NIGHTLY_OPENBLAS && 'nightly' || 'stable' }} OpenBLAS)"
64
+ steps :
65
+ - uses : actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
66
+ with :
67
+ submodules : recursive
68
+ fetch-depth : 0
69
+ - uses : actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
70
+ with :
71
+ python-version : ' 3.11'
72
+
73
+ - name : Install dependencies
74
+ run : |
75
+ pip install -r build_requirements.txt
76
+ # Install OpenBLAS
77
+ set -xe
78
+ if [[ $USE_NIGHTLY_OPENBLAS == "true" ]]; then
79
+ target=$(python tools/openblas_support.py --nightly)
80
+ else
81
+ target=$(python tools/openblas_support.py)
82
+ fi
83
+ sudo cp -r $target/lib/* /usr/lib
84
+ sudo cp $target/include/* /usr/include
85
+
86
+ - name : Build
87
+ shell : ' script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
88
+ env :
89
+ TERM : xterm-256color
90
+ run :
91
+ spin build -- --werror
92
+
93
+ - name : Check build-internal dependencies
94
+ run :
95
+ ninja -C build -t missingdeps
96
+
97
+ - name : Check installed test and stub files
98
+ run :
99
+ python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')
100
+
101
+ - name : Test
102
+ shell : ' script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
103
+ env :
104
+ TERM : xterm-256color
105
+ LD_LIBRARY_PATH : " /usr/local/lib/" # to find libopenblas.so.0
106
+
107
+ run : |
108
+ pip install pytest pytest-xdist hypothesis typing_extensions
109
+ spin test -j auto
0 commit comments