Skip to content

Commit b5246a7

Browse files
authored
Fix CI on MacOS (#191)
1 parent ee1daf5 commit b5246a7

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
build:
77

88
runs-on: ${{ matrix.os }}
9+
continue-on-error: True
910
strategy:
1011
fail-fast: false
11-
continue-on-error: True
1212
matrix:
1313
os: [ubuntu-latest]
1414
python-version: [3.9]

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ jobs:
2222
run: |
2323
if [ "$RUNNER_OS" = "macOS" ]; then
2424
brew update
25-
brew install openblas lapack
26-
export LDFLAGS="-L/usr/local/opt/lapack/lib"
27-
export CPPFLAGS="-I/usr/local/opt/lapack/include"
28-
export PKG_CONFIG_PATH="/usr/local/opt/lapack/lib/pkgconfig"
25+
brew install openblas
26+
mkdir -p ~/.matplotlib
27+
echo "backend: TkAgg" >> ~/.matplotlib/matplotlibrc
2928
else
3029
sudo apt-get update -qq
3130
sudo apt-get install -y build-essential gfortran libatlas-base-dev liblapacke-dev
@@ -35,7 +34,8 @@ jobs:
3534
pip install pylint coverage codecov
3635
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3736
- name: Install Libact
38-
run: ./setup.py build_ext --inplace
37+
run: |
38+
./setup.py build_ext --inplace
3939
- name: Unittests
4040
run: |
4141
python -m unittest -v

setup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,13 @@
2626
print("Platform Detection: Mac OS X. Link to openblas...")
2727
extra_link_args = []
2828
libraries = ['openblas']
29-
library_dirs = ['/opt/local/lib']
29+
library_dirs = [
30+
'/opt/local/lib',
31+
'/usr/local/opt/openblas/lib', # for brew installs
32+
]
3033
include_dirs = (numpy.distutils.misc_util.get_numpy_include_dirs() +
31-
['/opt/local/include'])
34+
['/opt/local/include',
35+
'/usr/local/opt/openblas/include']) # for brew installs
3236
else:
3337
# assume linux otherwise, unless we support Windows in the future...
3438
print("Platform Detection: Linux. Link to liblapacke...")

0 commit comments

Comments
 (0)