Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github action: bring back MacOS builds #1988

Merged
merged 1 commit into from
Jun 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,78 @@ name: Build tests
on: [pull_request]

jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
path: ['non-vpath', 'vpath']
sphinx: ['no-sphinx', 'sphinx']
steps:
- name: Install dependencies
run: brew install libevent hwloc autoconf automake libtool
- name: Git clone OpenPMIx
uses: actions/checkout@v3
with:
submodules: recursive
repository: openpmix/openpmix
path: openpmix/master
ref: master
- name: Build OpenPMIx
run: |
cd openpmix/master
# Homebrew doesn't install Libevent's (or libev's) header or
# library files into a default search location. Shrug. So
# use pkg-config to get the location and explicitly pass it to
# configure.
libevent_cppflags=$(pkg-config libevent --cflags)
libevent_ldflags=$(pkg-config libevent --libs | perl -pe 's/^.*(-L[^ ]+).*$/\1/')
./autogen.pl
./configure --prefix=$RUNNER_TEMP/pmixinstall \
CPPFLAGS=$libevent_cppflags \
LDFLAGS=$libevent_ldflags
make -j
make install
- name: Git clone PRRTE
uses: actions/checkout@v3
with:
submodules: recursive
clean: false
- name: Build PRRTE
run: |
./autogen.pl

sphinx=
if test "${{ matrix.sphinx }}" = sphinx; then
# The macos Github Action environment gets angry at us if
# we try to pip install into the global environment. So
# make a virtual environment and install sphinx into that.
python -m venv venv
. ./venv/bin/activate
pip3 install -r docs/requirements.txt
sphinx=--enable-sphinx
fi

c=./configure
if test "${{ matrix.path }}" = vpath; then
mkdir build
cd build
c=../configure
fi

# Homebrew doesn't install Libevent's (or libev's) header or
# library files into a default search location. Shrug. So
# use pkg-config to get the location and explicitly pass it to
# configure.
libevent_cppflags=$(pkg-config libevent --cflags)
libevent_ldflags=$(pkg-config libevent --libs | perl -pe 's/^.*(-L[^ ]+).*$/\1/')

$c --prefix=$RUNNER_TEMP/prteinstall --with-pmix=$RUNNER_TEMP/pmixinstall $sphinx \
CPPFLAGS=$libevent_cppflags \
LDFLAGS=$libevent_ldflags
make -j
make install
make uninstall

ubuntu:
runs-on: ubuntu-latest
strategy:
Expand Down
Loading