-
Notifications
You must be signed in to change notification settings - Fork 62
80 lines (71 loc) · 2.69 KB
/
build-and-test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# build-and-test.yml
#
# - Builds PyMFEM in three stages:
# - MFEM dependencies + MFEM
# - SWIG bindings
# - PyMFEM
# - Runs tests under `run_examples.py`
# - If there is a failure, uploads test outputs as an artifact
name: Build and Test
on:
workflow_dispatch:
inputs:
test_matrix:
description: 'Test all options in the matrix. If set to false, will only trigger the CI for the default options.'
required: true
default: false
type: boolean
pull_request:
jobs:
build-and-test-matrix:
if: ${{ github.event_name == 'pull_request' || inputs.test_matrix == true }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] # 3.12 is not supported by scipy
# NOTE: If setup.py could accept a commit hash as an argument, that could give us more flexibility here
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
parallel: [false, true]
cuda: [true]
libceed: [false]
gslib: [true]
phases: [true]
exclude:
# CUDA does not support MacOS
- os: macos-latest
cuda: true
runs-on: ${{ matrix.os }}
name: >-
Build/test:
${{ matrix.os }},
${{ matrix.python-version }},
${{ matrix.mfem-branch }},
(${{ matrix.parallel && 'parallel' || 'serial' }}${{ matrix.cuda && ' + cuda' || '' }}${{ matrix.libceed && ' + libceed' || '' }}${{ matrix.gslib && ' + gslib' || '' }})
env:
cuda-toolkit-version: '12.4.1'
cuda-driver-version: '550.54.15'
# -------------------------------------------------------------------------------------------------
# Begin workflow
# -------------------------------------------------------------------------------------------------
steps:
- name: Build and test pymfem
uses: mfem/github-actions/build-pymfem@pymfem-workflow
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
mfem-branch: ${{ matrix.mfem-branch }}
parallel: ${{ matrix.parallel }}
cuda: ${{ matrix.cuda }}
cuda-toolkit-version: ${{ env.cuda-toolkit-version }}
cuda-driver-version: ${{ env.cuda-driver-version }}
libceed: ${{ matrix.libceed }}
gslib: ${{ matrix.gslib }}
phases: ${{ matrix.phases }}
build-and-test-defaults:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' && inputs.test_matrix == false }}
name: "Build/test: (defaults)"
steps:
- name: Build and test pymfem
uses: mfem/github-actions/build-pymfem@pymfem-workflow