Skip to content

Commit 4d9ae0e

Browse files
jsquyreshppritcha
authored andcommitted
Github action: bring back MacOS builds
Fix the issues with the MacOS builds so that they work again in Github Action environments. Signed-off-by: Jeff Squyres <jeff@squyres.com> (cherry picked from commit 4a682ef)
1 parent c975a75 commit 4d9ae0e

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/builds.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,78 @@ name: Build tests
33
on: [pull_request]
44

55
jobs:
6+
macos:
7+
runs-on: macos-latest
8+
strategy:
9+
matrix:
10+
path: ['non-vpath', 'vpath']
11+
sphinx: ['no-sphinx', 'sphinx']
12+
steps:
13+
- name: Install dependencies
14+
run: brew install libevent hwloc autoconf automake libtool
15+
- name: Git clone OpenPMIx
16+
uses: actions/checkout@v3
17+
with:
18+
submodules: recursive
19+
repository: openpmix/openpmix
20+
path: openpmix/master
21+
ref: master
22+
- name: Build OpenPMIx
23+
run: |
24+
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/')
31+
./autogen.pl
32+
./configure --prefix=$RUNNER_TEMP/pmixinstall \
33+
CPPFLAGS=$libevent_cppflags \
34+
LDFLAGS=$libevent_ldflags
35+
make -j
36+
make install
37+
- name: Git clone PRRTE
38+
uses: actions/checkout@v3
39+
with:
40+
submodules: recursive
41+
clean: false
42+
- name: Build PRRTE
43+
run: |
44+
./autogen.pl
45+
46+
sphinx=
47+
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
53+
pip3 install -r docs/requirements.txt
54+
sphinx=--enable-sphinx
55+
fi
56+
57+
c=./configure
58+
if test "${{ matrix.path }}" = vpath; then
59+
mkdir build
60+
cd build
61+
c=../configure
62+
fi
63+
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
74+
make -j
75+
make install
76+
make uninstall
77+
678
ubuntu:
779
runs-on: ubuntu-latest
880
strategy:

0 commit comments

Comments
 (0)