-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
93 lines (81 loc) · 2.83 KB
/
linux_blas.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: BLAS tests (Linux)
# This file is meant for testing different BLAS/LAPACK flavors and build
# options on Linux. All other yml files for Linux will only test without BLAS
# (mostly because that's easier and faster to build) or with the same 64-bit
# OpenBLAS build that is used in the wheel jobs.
#
# Jobs and their purpose:
#
# - openblas64_setuppy:
# This job uses the default 64-bit build of OpenBLAS with the
# `numpy.distutils`-based build. It can be removed once we remove
# support for those builds.
# - openblas32_stable_nightly:
# Uses the 32-bit OpenBLAS builds, both the latest stable release and a
# nightly build.
#
# TODO: coverage here is limited, we should add non-OpenBLAS libraries and
# exercise the BLAS-related build options (see `meson_options.txt`).
on:
pull_request:
branches:
- main
- maintenance/**
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
openblas32_stable_nightly:
if: "github.repository == 'numpy/numpy'"
runs-on: ubuntu-latest
strategy:
matrix:
USE_NIGHTLY_OPENBLAS: [false, true]
env:
USE_NIGHTLY_OPENBLAS: ${{ matrix.USE_NIGHTLY_OPENBLAS }}
name: "Test Linux (${{ matrix.USE_NIGHTLY_OPENBLAS && 'nightly' || 'stable' }} OpenBLAS)"
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install -r build_requirements.txt
# Install OpenBLAS
set -xe
if [[ $USE_NIGHTLY_OPENBLAS == "true" ]]; then
target=$(python tools/openblas_support.py --nightly)
else
target=$(python tools/openblas_support.py)
fi
sudo cp -r $target/lib/* /usr/lib
sudo cp $target/include/* /usr/include
- name: Build
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
TERM: xterm-256color
run:
spin build -- --werror
- name: Check build-internal dependencies
run:
ninja -C build -t missingdeps
- name: Check installed test and stub files
run:
python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')
- name: Test
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
env:
TERM: xterm-256color
LD_LIBRARY_PATH: "/usr/local/lib/" # to find libopenblas.so.0
run: |
pip install pytest pytest-xdist hypothesis typing_extensions
spin test -j auto