Skip to content

Commit 2465f96

Browse files
committed
Merge CI builds into one action
1 parent e4ac63f commit 2465f96

File tree

2 files changed

+95
-106
lines changed

2 files changed

+95
-106
lines changed

.github/workflows/build.yml

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
c-compiler: 'clang'
2424
cxx-compiler: 'clang++'
2525
fail-fast: false
26-
name: ${{ matrix.c-compiler}} Python ${{ matrix.py-version }}
26+
name: Linux ${{ matrix.c-compiler}} Python ${{ matrix.py-version }}
2727

2828

2929
runs-on: ubuntu-latest
@@ -125,3 +125,97 @@ jobs:
125125
path: flake8-${{ matrix.c-compiler }}-${{ matrix.py-version }}.xml
126126
reporter: java-junit
127127
fail-on-error: false
128+
129+
mac:
130+
131+
strategy:
132+
matrix:
133+
py-version: ['3.10']
134+
fail-fast: false
135+
name: Mac clang Python ${{ matrix.py-version }}
136+
137+
runs-on: macos-latest
138+
timeout-minutes: 180
139+
env:
140+
MPIEXEC_FLAGS: "--allow-run-as-root --oversubscribe"
141+
PYNUCLEUS_BUILD_PARALLELISM: 3
142+
SUITESPARSE_INCLUDE_DIR: /usr/local/Cellar/brewsci-suite-sparse/4.5.5_2/include
143+
SUITESPARSE_LIBRARY_DIR: /usr/local/Cellar/brewsci-suite-sparse/4.5.5_2/lib
144+
LDFLAGS: -L/usr/local/opt/brewsci-metis/lib -L/usr/local/opt/brewsci-parmetis/lib
145+
CPPFLAGS: -I/usr/local/opt/brewsci-metis/include -I/usr/local/opt/brewsci-parmetis/include
146+
147+
steps:
148+
- name: Check out repo
149+
uses: actions/checkout@v3
150+
151+
- name: Pull ccache cache
152+
if: always()
153+
id: ccache-restore
154+
uses: actions/cache/restore@v3
155+
with:
156+
path: /Users/runner/Library/Caches/ccache
157+
key: ccache-mac-${{ matrix.py-version }}
158+
159+
- name: Setup GNU Fortran
160+
uses: modflowpy/install-gfortran-action@v1
161+
162+
- uses: actions/setup-python@v4
163+
with:
164+
python-version: ${{ matrix.py-version }}
165+
166+
- name: Install packages
167+
run: |
168+
brew install open-mpi ccache
169+
brew tap brewsci/num
170+
brew install brewsci-metis brewsci-parmetis brewsci-suite-sparse
171+
172+
- name: Get ccache config dir
173+
if: always()
174+
run: ccache --show-config
175+
176+
- name: Install Python dependencies
177+
run: make prereq && make prereq-extra
178+
179+
- name: Install
180+
run: PIP_INSTALL_FLAGS=-vvv make install
181+
182+
- name: Remove ccache cache
183+
if: ${{ steps.ccache-restore.outputs.cache-hit }}
184+
shell: bash
185+
env:
186+
GH_TOKEN: ${{ github.token }}
187+
run: |
188+
gh extension install actions/gh-actions-cache
189+
gh actions-cache delete ccache-mac-${{ matrix.py-version }} --confirm
190+
continue-on-error: true
191+
192+
- name: Push ccache cache
193+
if: always()
194+
uses: actions/cache/save@v3
195+
with:
196+
path: /Users/runner/Library/Caches/ccache
197+
key: ccache-mac-${{ matrix.py-version }}
198+
199+
- name: Ccache report
200+
if: always()
201+
run: ccache -s
202+
203+
- name: Run tests
204+
if: always()
205+
run: python3 -m pytest --junit-xml=test-results-Mac-${{ matrix.py-version }}.xml tests/
206+
207+
- name: Archive test results
208+
uses: actions/upload-artifact@v3
209+
if: always()
210+
with:
211+
name: Test results
212+
path: test-results-${{ matrix.py-version }}.xml
213+
214+
- name: Report test results
215+
uses: dorny/test-reporter@v1
216+
if: always()
217+
with:
218+
name: Test report (Mac, Python ${{ matrix.py-version }})
219+
path: test-results-Mac-${{ matrix.py-version }}.xml
220+
reporter: java-junit
221+
fail-on-error: true

.github/workflows/mac.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)