attempt to fix Mac build #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI MacOS | |
on: | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
jobs: | |
mac: | |
strategy: | |
matrix: | |
py-version: ['3.10'] | |
fail-fast: false | |
name: Python ${{ matrix.py-version }} | |
runs-on: macos-latest | |
timeout-minutes: 180 | |
env: | |
MPIEXEC_FLAGS: "--allow-run-as-root --oversubscribe" | |
PYNUCLEUS_BUILD_PARALLELISM: 3 | |
SUITESPARSE_INCLUDE_DIR: /usr/local/Cellar/brewsci-suite-sparse/4.5.5_2/include | |
SUITESPARSE_LIBRARY_DIR: /usr/local/Cellar/brewsci-suite-sparse/4.5.5_2/lib | |
LDFLAGS: -L/usr/local/opt/brewsci-metis/lib -L/usr/local/opt/brewsci-parmetis/lib | |
CPPFLAGS: -I/usr/local/opt/brewsci-metis/include -I/usr/local/opt/brewsci-parmetis/include | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Pull ccache cache | |
if: always() | |
id: ccache-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: /Users/runner/Library/Caches/ccache | |
key: ccache-mac-${{ matrix.py-version }} | |
- name: Setup GNU Fortran | |
uses: modflowpy/install-gfortran-action@v1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.py-version }} | |
- name: Install packages | |
run: | | |
brew install open-mpi ccache | |
brew tap brewsci/num | |
brew install brewsci-metis brewsci-parmetis brewsci-suite-sparse | |
- name: Get ccache config dir | |
if: always() | |
run: ccache --show-config | |
- name: Install Python dependencies | |
run: make prereq && make prereq-extra | |
- name: Install | |
run: PIP_INSTALL_FLAGS=-vvv make install | |
- name: Remove ccache cache | |
if: ${{ steps.ccache-restore.outputs.cache-hit }} | |
shell: bash | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: | | |
gh extension install actions/gh-actions-cache | |
gh actions-cache delete ccache-mac-${{ matrix.py-version }} --confirm | |
continue-on-error: true | |
- name: Push ccache cache | |
if: always() | |
uses: actions/cache/save@v3 | |
with: | |
path: /Users/runner/Library/Caches/ccache | |
key: ccache-mac-${{ matrix.py-version }} | |
- name: Ccache report | |
if: always() | |
run: ccache -s | |
- name: Run tests | |
if: always() | |
run: | | |
drivers/runFractional.py --hdf5Output=dense.hdf5 --skipPlots --saveOperators --matrixFormat=dense | |
drivers/runFractional.py --hdf5Output=h2.hdf5 --skipPlots --saveOperators | |
- name: Archive test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Test results | |
path: | | |
dense.hdf5 | |
h2.hdf5 |