-
Notifications
You must be signed in to change notification settings - Fork 59
75 lines (61 loc) · 1.82 KB
/
build-numpy.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
name: NumPy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '0 5 * * *'
jobs:
NumPyMultiarrayTests:
runs-on: ubuntu-latest
steps:
- name: Checkout x86-simd-sort
uses: actions/checkout@v3
with:
fetch-depth: 0
path: x86-simd-sort
- name: Specify branch name
working-directory: ${{ github.workspace }}/x86-simd-sort
run: git switch -c pr-branch
- name: Install build dependencies
run: |
sudo apt update
sudo apt -y install g++-12 gcc-12 git
- name: Checkout NumPy main
uses: actions/checkout@v3
with:
repository: numpy/numpy
submodules: recursive
fetch-depth: 0
ref: main
path: numpy
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install NumPy dependencies
working-directory: ${{ github.workspace }}/numpy
run: |
pip install -r build_requirements.txt
pip install -r test_requirements.txt
- name: Update x86-simd-sort
working-directory: ${{ github.workspace }}/numpy
run: |
cd numpy/core/src/npysort/x86-simd-sort
git remote add temp ${{ github.workspace }}/x86-simd-sort
git fetch temp
git checkout temp/pr-branch
- name: Build NumPy
working-directory: ${{ github.workspace }}/numpy
env:
CXX: g++-12
CC: gcc-12
run: |
spin build -- -Dallow-noblas=true
- name: Run multiarray tests
run: |
export NUMPY_SITE=$(realpath build-install/usr/lib/python*/site-packages/)
export PYTHONPATH="$PYTHONPATH:$NUMPY_SITE"
cd build-install &&
python -c "import numpy; numpy.show_config()" &&
python -m pytest $NUMPY_SITE/numpy/core/tests/test_multiarray.py