-
Notifications
You must be signed in to change notification settings - Fork 161
48 lines (45 loc) · 1.54 KB
/
build-mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Test MacOS
on:
push:
branches:
- master
pull_request:
# By default this workflow is run on the "opened", "synchronize" and
# "reopened" events. We add "labelled" so it will run if the PR is given a label.
types: [opened, synchronize, reopened, labeled]
concurrency:
# Cancels jobs running if new commits are pushed
group: >
${{ github.workflow }}-
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build Firedrake
runs-on: [self-hosted, macOS]
# Only run this action if we are pushing to master or the PR is labelled "macOS"
if: ${{ (github.ref == 'refs/heads/master') || contains(github.event.pull_request.labels.*.name, 'macOS') }}
env:
OMP_NUM_THREADS: 1
OPENBLAS_NUM_THREADS: 1
steps:
- uses: actions/checkout@v4
- name: Install Python
run: |
brew install [email protected]
$(brew --prefix)/bin/python3 -m pip install -U pip
$(brew --prefix)/bin/python3 -m pip install -U setuptools
- name: Build Firedrake
run: |
cd ..
$(brew --prefix)/bin/python3 \
firedrake/scripts/firedrake-install \
--venv-name firedrake_venv \
--disable-ssh \
|| (cat firedrake-install.log && /bin/false)
- name: Run smoke tests
run: |
. ../firedrake_venv/bin/activate
python -m pytest -v tests/regression/ \
-k "poisson_strong or stokes_mini or dg_advection"
timeout-minutes: 30