forked from eos/eos
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (84 loc) · 2.96 KB
/
macos-build+check.yaml
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
94
95
on:
push:
branches: [ master, testing ]
pull_request:
name: Build/Check on MacOS
jobs:
macos-build-check:
name: Build on MacOS
runs-on: macos-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v2
with:
path: _src/
- name: Fetch tags
shell: bash
run: |
pushd _src
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
popd
- name: Prepare VM
shell: bash
env:
PYTHON: /usr/local/bin/python3.9
run: |
export HOMEBREW_LOGS=/tmp
brew tap eos/eos
brew outdated python@3.9 || brew upgrade python@3.9 || true
rm -Rf '/usr/local/lib/python2.7/site-packages/numpy/'
brew outdated boost || brew upgrade boost || true
brew outdated boost-python3 || brew upgrade boost-python3 || true
brew install autoconf automake boost-python3 gsl libtool pkg-config yaml-cpp
brew link --overwrite --force python@3.9
$PYTHON -m pip install -U cython h5py matplotlib numpy "pypmc>=1.2" PyYAML scipy wilson
- name: Create build directory
shell: bash
run: mkdir -p _build
- name: Configure
shell: bash
env:
CXXFLAGS: "-O2 -g -march=x86-64"
PYTHON: /usr/local/bin/python3.9
run: |
echo ===
ls -ld /usr/local/Cellar/python*
echo ===
ls -ld /usr/local/Cellar/python@3.9/
echo ===
find /usr/local/Cellar/python@3.9 -name "python3*"
echo ===
SUFFIX=$($PYTHON -c "import sys; print('{0}{1}'.format(sys.version_info[0], sys.version_info[1]))")
echo using boost-python suffix ${SUFFIX}
pushd _src
./autogen.bash
popd
pushd _build
../_src/configure \
--enable-python \
--with-boost-python-suffix=${SUFFIX} \
--prefix=/usr/local \
PYTHON=${PYTHON}
popd
- name: Build & Install
shell: bash
run: |
pushd _build
make -j2 all
make install
popd
- name: Check
shell: bash
run: |
pushd _build
make check -j2 VERBOSE=1
popd
- name: Run examples
shell: bash
run: |
pushd _build
export PYTHONPATH+=":$(make print-pythondir)"
popd
pushd _src
make -C examples/cli examples
popd