forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (73 loc) · 2.97 KB
/
macos.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
name: macOS tests
on:
push:
branches:
- master
- maintenance/**
pull_request:
branches:
- master
- maintenance/**
jobs:
test_macos:
name: macOS Test Matrix
if: "github.repository == 'scipy/scipy' && !contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip github]')"
runs-on: macos-latest
strategy:
max-parallel: 3
matrix:
python-version: [3.7, 3.8, 3.9]
numpy-version: ['--upgrade numpy']
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup gfortran
run: |
# this is taken verbatim from the numpy azure pipeline setup.
set -xe
# same version of gfortran as the open-libs and numpy-wheel builds
curl -L https://github.com/MacPython/gfortran-install/raw/master/archives/gfortran-4.9.0-Mavericks.dmg -o gfortran.dmg
GFORTRAN_SHA256=$(shasum -a 256 gfortran.dmg)
KNOWN_SHA256="d2d5ca5ba8332d63bbe23a07201c4a0a5d7e09ee56f0298a96775f928c3c4b30 gfortran.dmg"
if [ "$GFORTRAN_SHA256" != "$KNOWN_SHA256" ]; then
echo sha256 mismatch
exit 1
fi
hdiutil attach -mountpoint /Volumes/gfortran gfortran.dmg
sudo installer -pkg /Volumes/gfortran/gfortran.pkg -target /
otool -L /usr/local/gfortran/lib/libgfortran.3.dylib
# Manually symlink gfortran-4.9 to plain gfortran for f2py.
# No longer needed after Feb 13 2020 as gfortran is already present
# and the attempted link errors. Keep this for future reference.
# ln -s /usr/local/bin/gfortran-4.9 /usr/local/bin/gfortran
- name: Setup openblas
run: |
# this is taken verbatim from the numpy azure pipeline setup.
set -xe
target=$(python tools/openblas_support.py)
ls -lR $target
# manually link to appropriate system paths
cp $target/lib/lib* /usr/local/lib/
cp $target/include/* /usr/local/include/
# otool -L /usr/local/lib/libopenblas*
echo "[openblas]" > site.cfg
echo "libraries = openblas" >> site.cfg
echo "library_dirs = /usr/local/lib" >> site.cfg
echo "include_dirs = /usr/local/include" >> site.cfg
echo "runtime_library_dirs = /usr/local/lib" >> site.cfg
- name: A few other packages
continue-on-error: true
run: |
brew install libmpc suitesparse swig
- name: Install packages
run: |
pip install ${{ matrix.numpy-version }}
pip install setuptools wheel cython pytest pytest-xdist pybind11 pytest-xdist mpmath gmpy2 pythran
- name: Test SciPy
run: |
SCIPY_USE_PYTHRAN=`test ${{ matrix.python-version }} != 3.9; echo $?` python -u runtests.py