Skip to content

Commit 7693b66

Browse files
authored
Merge pull request #3 from hppritcha/fix-macos-tests
Fix macos tests
2 parents 1d867e8 + c434a36 commit 7693b66

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/builds.yaml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@ jobs:
2222
- name: Build OpenPMIx
2323
run: |
2424
cd openpmix/master
25+
# Homebrew doesn't install Libevent's (or libev's) header or
26+
# library files into a default search location. Shrug. So
27+
# use pkg-config to get the location and explicitly pass it to
28+
# configure.
29+
libevent_cppflags=$(pkg-config libevent --cflags)
30+
libevent_ldflags=$(pkg-config libevent --libs | perl -pe 's/^.*(-L[^ ]+).*$/\1/')
2531
./autogen.pl
26-
./configure --prefix=$RUNNER_TEMP/pmixinstall
32+
./configure --prefix=$RUNNER_TEMP/pmixinstall \
33+
CPPFLAGS=$libevent_cppflags \
34+
LDFLAGS=$libevent_ldflags
2735
make -j
2836
make install
2937
- name: Git clone PRRTE
@@ -37,6 +45,11 @@ jobs:
3745
3846
sphinx=
3947
if test "${{ matrix.sphinx }}" = sphinx; then
48+
# The macos Github Action environment gets angry at us if
49+
# we try to pip install into the global environment. So
50+
# make a virtual environment and install sphinx into that.
51+
python -m venv venv
52+
. ./venv/bin/activate
4053
pip3 install -r docs/requirements.txt
4154
sphinx=--enable-sphinx
4255
fi
@@ -48,7 +61,16 @@ jobs:
4861
c=../configure
4962
fi
5063
51-
$c --prefix=$RUNNER_TEMP/prteinstall --with-pmix=$RUNNER_TEMP/pmixinstall $sphinx
64+
# Homebrew doesn't install Libevent's (or libev's) header or
65+
# library files into a default search location. Shrug. So
66+
# use pkg-config to get the location and explicitly pass it to
67+
# configure.
68+
libevent_cppflags=$(pkg-config libevent --cflags)
69+
libevent_ldflags=$(pkg-config libevent --libs | perl -pe 's/^.*(-L[^ ]+).*$/\1/')
70+
71+
$c --prefix=$RUNNER_TEMP/prteinstall --with-pmix=$RUNNER_TEMP/pmixinstall $sphinx \
72+
CPPFLAGS=$libevent_cppflags \
73+
LDFLAGS=$libevent_ldflags
5274
make -j
5375
make install
5476
make uninstall

0 commit comments

Comments
 (0)