-
Notifications
You must be signed in to change notification settings - Fork 62
85 lines (77 loc) · 3.04 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
81
82
83
84
85
# build-and-test.yml
#
# Dispatch workflow for build-and-test-callable.yml
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.'
default: false
type: boolean
pull_request:
jobs:
# -------------------------------------------------------------------------------------------------
# Build and test matrix
# -------------------------------------------------------------------------------------------------
build-and-test-matrix:
if: ${{ github.event_name == 'pull_request' || inputs.test_matrix == true }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-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: [false]
libceed: [false]
gslib: [false]
# We don't want to expand dimensions for the following configurations
include:
- os: macos-latest
python-version: '3.9'
mfem-branch: 'default'
parallel: false
cuda: false
- os: ubuntu-latest
python-version: '3.9'
mfem-branch: 'default'
parallel: false
cuda: true
- os: ubuntu-latest
python-version: '3.9'
mfem-branch: 'default'
parallel: false
libceed: true
- os: ubuntu-latest
python-version: '3.9'
mfem-branch: 'default'
parallel: false
gslib: true
# CUDA does not support MacOS - this is a safeguard and shouldn't be needed for most matrix configs
exclude:
- os: macos-latest
cuda: true
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
mfem-branch: ${{ matrix.mfem-branch }}
parallel: ${{ matrix.parallel }}
cuda: ${{ matrix.cuda }}
libceed: ${{ matrix.libceed }}
gslib: ${{ matrix.gslib }}
name:
# name: >-
# Build/test:
# ${{ matrix.os }},
# ${{ matrix.python-version }},
# ${{ matrix.mfem-branch }},
# (${{ matrix.parallel && 'parallel' || 'serial' }}${{ matrix.cuda && ' + cuda' || '' }}${{ matrix.libceed && ' + libceed' || '' }}${{ matrix.gslib && ' + gslib' || '' }})
# -------------------------------------------------------------------------------------------------
# Build and test defaults
# -------------------------------------------------------------------------------------------------
build-and-test-defaults:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.test_matrix == false }}
uses: ./.github/workflows/build-and-test-callable.yml