Skip to content

Commit b5d181a

Browse files
committed
Add Action for MacOS installation
1 parent 4f3df85 commit b5d181a

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build and Test Python bindings on macOS
2+
on:
3+
push:
4+
branches-ignore:
5+
- '**'
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }}
11+
runs-on: [self-hosted, macOS]
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- CONFIG: MPIPETSc
17+
CXX: 'clang++'
18+
TYPE: Debug
19+
steps:
20+
- name: Generate build directory
21+
run: mkdir -p build
22+
- name: Configure
23+
working-directory: build
24+
env:
25+
CXX: ${{ matrix.CXX }}
26+
CXXFLAGS: "-Wall"
27+
MPI: ${{ contains(matrix.CONFIG, 'MPI') }}
28+
PETSc: ${{ contains(matrix.CONFIG, 'PETSc') }}
29+
run: |
30+
cmake --version
31+
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ matrix.TYPE }} -DPRECICE_MPICommunication=${{ env.MPI }} -DPRECICE_PETScMapping=${{ env.PETSc }} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
32+
- uses: actions/upload-artifact@v2
33+
if: failure()
34+
with:
35+
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CMakeCache
36+
path: build/CMakeCache.txt
37+
- uses: actions/upload-artifact@v2
38+
if: failure()
39+
with:
40+
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CMakeLogs
41+
path: 'build/CMakeFiles/*.log'
42+
- uses: actions/upload-artifact@v2
43+
if: failure()
44+
with:
45+
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} CompileCommands
46+
path: build/compile_commands.json
47+
- name: Compile
48+
working-directory: build
49+
run: |
50+
make -j $(sysctl -n hw.ncpu)
51+
- uses: actions/upload-artifact@v2
52+
if: failure()
53+
with:
54+
name: ${{ format('{0} {1} {2}', matrix.CXX, matrix.CONFIG, matrix.TYPE) }} TestOutput
55+
path: build/TestOutput/
56+
- name: Install & upgrade pip3
57+
run: python -m ensurepip --upgrade
58+
- name: Run pip install
59+
run: pip3 install --user .
60+
- name: Run pip install
61+
run: python3 -c "import precice"

0 commit comments

Comments
 (0)