Skip to content

Add Action for MacOS installation #138

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

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5d181a
Add Action for MacOS installation
ajaust Mar 29, 2022
1c2727f
Update runs-on target
ajaust Mar 29, 2022
122d853
Update action triggers
ajaust Mar 29, 2022
488ee9f
Checkout preCICE
ajaust Mar 29, 2022
5fedacd
Add checkout of Python bindings repository
ajaust Mar 29, 2022
dcd64d4
Fix YAML file formatting
ajaust Mar 29, 2022
5657e85
Print directories
ajaust Mar 29, 2022
f3ad4d7
Change preCICE checkout routine
ajaust Mar 29, 2022
bc72ab0
Change preCICE repo checkout path
ajaust Mar 29, 2022
94a7463
Actually checkout correct preCICE repository
ajaust Mar 29, 2022
921d4f6
Checkout preCICE bindings
ajaust Mar 29, 2022
0916d47
Install preCICE dependencies
ajaust Mar 29, 2022
9716e02
Fix working dir for build phase
ajaust Mar 29, 2022
31ed091
Install preCICE to /usr/local
ajaust Mar 29, 2022
a5a68c8
Export CPATH
ajaust Mar 29, 2022
6120046
Rename action
ajaust Mar 29, 2022
0968261
Actually install preCICE
ajaust Mar 29, 2022
c03c333
Install into /usr/local
ajaust Mar 29, 2022
4af497b
Export CPLUS_INCLUDE_PATH
ajaust Mar 29, 2022
893d5a8
Export DYLD_LIBRARY_PATH
ajaust Mar 29, 2022
d4e497b
Extend PKG_CONFIG_PATH
ajaust Mar 29, 2022
dec59c5
Use pkgconfig to get link and compile flags
ajaust Mar 29, 2022
ab065c8
Fix PKG_CONFIG_PATH
ajaust Mar 29, 2022
fc154c9
Export DYLD_LIBRARY_PATH for Python call
ajaust Mar 29, 2022
93f7466
Revert changes that use pkgconfig
ajaust Mar 29, 2022
f74199e
Clean up action a bit
ajaust Mar 29, 2022
bc23989
Merge branch 'develop' into add-macos-action
BenjaminRodenberg Mar 12, 2025
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
77 changes: 77 additions & 0 deletions .github/workflows/build-and-test-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Build and Test (macOS)
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"

jobs:
build:
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- CONFIG: MPIPETSc
CXX: 'clang++'
TYPE: Debug
steps:
- name: Install preCICE dependencies
run: brew install cmake eigen libxml2 boost petsc openmpi python3 numpy
- name: Check out preCICE
uses: actions/checkout@v3
with:
repository: precice/precice
ref: 'master'
path: 'precice-repo'
- name: Generate build directory
run: mkdir -p precice-repo/build
- name: Configure preCICE
working-directory: precice-repo/build
env:
CXX: ${{ matrix.CXX }}
CXXFLAGS: "-Wall"
MPI: ${{ contains(matrix.CONFIG, 'MPI') }}
PETSc: ${{ contains(matrix.CONFIG, 'PETSc') }}
run: |
cmake --version
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=${{ matrix.TYPE }} -DPRECICE_MPICommunication=${{ env.MPI }} -DPRECICE_PETScMapping=${{ env.PETSc }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
- uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CMakeCache
path: precice-repo/build/CMakeCache.txt
- uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CMakeLogs
path: 'precice-repo/build/CMakeFiles/*.log'
- uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CompileCommands
path: precice-repo/build/compile_commands.json
- name: Compile and install preCICE
working-directory: precice-repo/build
run: |
make -j $(sysctl -n hw.ncpu)
make install
- uses: actions/upload-artifact@v2
if: failure()
with:
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} TestOutput
path: precice-repo/build/TestOutput/
- name: Check out Python binding repository
uses: actions/checkout@v3
- name: Install & upgrade pip3
run: python3 -m ensurepip --upgrade
- name: Install bindings using pip
run: |
export PKG_CONFIG_PATH="/usr/local/lib/precice/pkgconfig":"${PKG_CONFIG_PATH}"
pip3 install --user .
- name: Import Python bindings
run: |
python3 -c "import precice"
Loading