Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
241 commits
Select commit Hold shift + click to select a range
e04db13
Syntax highlighting
tkoyama010 Aug 15, 2023
b76ec28
initial commit build-and-test.yml
justinlaughlin Mar 26, 2024
ac953d6
update action versions
justinlaughlin Mar 26, 2024
682a301
move PATH/PYTHONPATH to separate action and export via GITHUB_ENV and…
justinlaughlin Mar 27, 2024
002c726
lots of changes to build-and-test.yml
justinlaughlin Apr 4, 2024
406912e
attempting to test; adding workflow_dispatch to 'on'
justinlaughlin Apr 5, 2024
a935d14
remove conditional for trigger
justinlaughlin Apr 5, 2024
fa2eb0b
remove matrix options for testing, setting fail fast to true, fixing …
justinlaughlin Apr 5, 2024
adc2636
GITHUB_ENV cant be accessed until next step
justinlaughlin Apr 5, 2024
7e9041c
fix bools
justinlaughlin Apr 5, 2024
f48877e
removing unnecessary dependencies?
justinlaughlin Apr 6, 2024
c523745
removing trailing whitespace
justinlaughlin Apr 8, 2024
4394196
remove numba_scipy dependency from ex25 and ex25p
justinlaughlin Apr 8, 2024
3c4d14a
add numba to requirements.txt and removed from CI
justinlaughlin Apr 8, 2024
6984965
remove swig install from CI becuase it is in requirements.txt
justinlaughlin Apr 8, 2024
b7ab2eb
clean up CI script
justinlaughlin Apr 8, 2024
d37646f
trying to add numba-scipy to requirements
justinlaughlin Apr 8, 2024
bb8025b
typo
justinlaughlin Apr 8, 2024
7c3e0ca
comment out print for now
justinlaughlin Apr 8, 2024
3db7c84
remove env.SANDBOX
justinlaughlin Apr 8, 2024
bf14b27
hopefully fixed python package print out
justinlaughlin Apr 8, 2024
9eae6ea
remove numba-scipy
justinlaughlin Apr 8, 2024
71329ea
pip list
justinlaughlin Apr 9, 2024
dba224a
cleanup
justinlaughlin Apr 9, 2024
fc441ea
little bit more cleanup and re-add numba-scipy (even though it is not…
justinlaughlin Apr 9, 2024
5b738f1
remove sandbox
justinlaughlin Apr 9, 2024
0bd3beb
more cleanup
justinlaughlin Apr 9, 2024
3978301
trying flag for phased build
justinlaughlin Apr 10, 2024
11c0a24
Adding in rest of flags (WIP)
justinlaughlin Apr 10, 2024
8667ef5
change matrix so that 'phases' build is only tested once
justinlaughlin Apr 10, 2024
1313526
fix job name, exclude macos+cuda, add cuda run file
justinlaughlin Apr 10, 2024
20123cf
fix typo
justinlaughlin Apr 10, 2024
84befb8
fix formatting
justinlaughlin Apr 10, 2024
8a8ce35
vscode linter doesn't like it, but is it the right syntax?
justinlaughlin Apr 10, 2024
926d52c
trying gh action format() instead (I don't think nested variables works)
justinlaughlin Apr 10, 2024
81734d5
another formatting attempt
justinlaughlin Apr 10, 2024
9c3f999
another formatting attempt
justinlaughlin Apr 10, 2024
e411cd4
another formatting attempt
justinlaughlin Apr 10, 2024
f7fba22
another formatting attempt
justinlaughlin Apr 10, 2024
467ea00
another formatting attempt
justinlaughlin Apr 10, 2024
c345200
another formatting attempt; os needed to be in 'include'
justinlaughlin Apr 10, 2024
0424edb
use yaml > syntax
justinlaughlin Apr 11, 2024
1764cca
update name
justinlaughlin Apr 11, 2024
7dbb88f
change cuda install to sudo and update name/flag formatting
justinlaughlin Apr 11, 2024
a19a326
update cuda install
justinlaughlin Apr 11, 2024
234a33e
update cuda install
justinlaughlin Apr 11, 2024
8d00a87
need to escape single quote for mfem-branch flag
justinlaughlin Apr 11, 2024
69397bd
remove CUDA env var
justinlaughlin Apr 11, 2024
0096669
change run to source for cuda
justinlaughlin Apr 15, 2024
ddfa4b5
use sudo sh for cuda run script
justinlaughlin Apr 15, 2024
022c7f3
debugging
justinlaughlin Apr 15, 2024
80983ed
trying apt
justinlaughlin Apr 15, 2024
db1fdce
add update
justinlaughlin Apr 15, 2024
6637625
break up build into phases. test cuda and non-cuda
justinlaughlin Apr 15, 2024
4a631a3
toolkit flag
justinlaughlin Apr 16, 2024
b6610d0
test only cuda
justinlaughlin Apr 16, 2024
f01f7ad
use cuda script
justinlaughlin Apr 16, 2024
07ea801
typo
justinlaughlin Apr 16, 2024
d3c33fb
compare with run file
justinlaughlin Apr 16, 2024
d80b4d6
remove driver flag
justinlaughlin Apr 16, 2024
6b45cdb
cleanup
justinlaughlin Apr 16, 2024
28ae5a7
a lot more cleanup and testing actions/cache@v4 with CUDA since it is…
justinlaughlin Apr 16, 2024
c6f251e
syntax fix
justinlaughlin Apr 16, 2024
3be2363
another attempt at syntax fix
justinlaughlin Apr 16, 2024
0f320b8
debugging cache
justinlaughlin Apr 16, 2024
db228b5
more debugging cache
justinlaughlin Apr 16, 2024
8ac4efd
debug cache
justinlaughlin Apr 16, 2024
61a1f6f
testing cuda ache
justinlaughlin Apr 16, 2024
6b8fa84
rerun and see if cache works
justinlaughlin Apr 16, 2024
1b3aaa4
cleanup; run matrix
justinlaughlin Apr 16, 2024
5eba2cb
python versions must be strings because of 3.10
justinlaughlin Apr 16, 2024
110a0da
add more to matrix, turn off fail fast, update requirements
justinlaughlin Apr 16, 2024
a8166ab
add back in a single case where build is run all at once
justinlaughlin Apr 19, 2024
8b2b103
change python versions to 3.7-3.11 (3.12 is not supported by librarie…
justinlaughlin Apr 19, 2024
02fc931
cleanup and add comments
justinlaughlin Apr 19, 2024
c27e9df
flag for setup.py should be --vv, not --verbose
justinlaughlin Apr 19, 2024
dbc524e
move cuda-version to env and change to dict
justinlaughlin Apr 19, 2024
ea0f04f
fix env var
justinlaughlin Apr 19, 2024
bdf20c4
remove swig clean line
justinlaughlin Apr 19, 2024
838e8ff
fixed indentation
justinlaughlin Apr 19, 2024
4876868
hopefully this fixes the yaml error
justinlaughlin Apr 19, 2024
903f878
addded attribute_sets and arrays_by_name wrapper
sshiraiwa Apr 20, 2024
1e19fee
fixed error metioned in #213
sshiraiwa Apr 20, 2024
a63b24e
removded bilininteg_ext.i and lininteg_ext.i from git tracking
sshiraiwa Apr 20, 2024
93c8fa8
rolled back bilininteg_ext.i and lininteg_ext.i
sshiraiwa Apr 20, 2024
34f96a9
Merge pull request #218 from mfem/workflows
sshiraiwa Apr 23, 2024
e92fa86
create callable workflow
justinlaughlin May 8, 2024
1d0dc3f
add checkout
justinlaughlin May 8, 2024
7052723
change yaml spec so that 'uses' is directly below job
justinlaughlin May 8, 2024
fdfcd3a
update requirements so that numpy < 2.0.0
justinlaughlin Jun 24, 2024
98227f8
Merge pull request #224 from mfem/update-requirements-numpy
sshiraiwa Jun 25, 2024
4ec05da
Merge pull request #219 from mfem/attribute_sets_dev
sshiraiwa Jun 25, 2024
932f8b9
include a macos test case. remove some options that wont be in matrix…
justinlaughlin Jun 26, 2024
a6c7044
add single tests for cuda/libceed/gslib. fix name
justinlaughlin Jun 26, 2024
7494131
updates to matrix. move specific cases out of matrix
justinlaughlin Jun 26, 2024
55085bf
fix error in dispatcher
justinlaughlin Jun 26, 2024
ab79440
add master branch for macos test. retry name
justinlaughlin Jun 26, 2024
e2847bc
another attempt at fixing name
justinlaughlin Jun 26, 2024
760f4be
another attempt at fixing name
justinlaughlin Jun 26, 2024
98c7a92
another attempt at fixing name
justinlaughlin Jun 26, 2024
81f579f
another attempt at fixing name
justinlaughlin Jun 26, 2024
3b246c4
forgot to add callable workflow
justinlaughlin Jun 26, 2024
7114e13
typo
justinlaughlin Jun 26, 2024
817a728
add fast test option
justinlaughlin Jun 26, 2024
808a8fb
rename so we can see the worfklow trigger
justinlaughlin Jun 26, 2024
43af97d
cleanup dispatch. remove old ci scripts
justinlaughlin Jun 26, 2024
889c5e8
fix name on test-fast
justinlaughlin Jun 26, 2024
db48c70
fixing eltrans (TransformBack) and mesh (unique_ptr)
sshiraiwa Jun 26, 2024
1ec7493
rename
justinlaughlin Jun 26, 2024
22aad8c
Merge pull request #222 from mfem/callable_workflow
sshiraiwa Jun 26, 2024
a9370ea
fixing eltrans (TransformBack) and mesh (unique_ptr)
sshiraiwa Jun 27, 2024
a7bd4c1
fixing pbilinearform...missing pgridfunc
sshiraiwa Jun 27, 2024
56ba1c3
fixed ex23?
sshiraiwa Jun 28, 2024
0b019ce
fixing ex23 for default branch
sshiraiwa Jun 29, 2024
d33d33a
Update requirements.txt
sshiraiwa Jun 29, 2024
9ed9f18
Merge pull request #225 from mfem/fix_eltrans_mesh
sshiraiwa Jun 30, 2024
e5aa8ab
Merge pull request #192 from tkoyama010/doc/syntax-highlighting
sshiraiwa Jun 30, 2024
24e736d
Merge pull request #226 from mfem/swig_req_update
sshiraiwa Jul 1, 2024
a1bc627
update default mfem version to 4.7
justinlaughlin Jul 1, 2024
cfcf247
Merge pull request #228 from mfem/update-mfem-default-branch
sshiraiwa Jul 2, 2024
009b777
(WIP) modified a wrapper generation so that AttributeSets::GetAttribu…
sshiraiwa Jul 13, 2024
b2c4af5
ex39 seems okay. need to check with GLVIS
sshiraiwa Jul 13, 2024
5e73aa4
added ex39p.py
sshiraiwa Jul 13, 2024
ef6cc30
update ex18 to match changes in cpp version
justinlaughlin Jul 1, 2024
1c717b2
addressing ex18 issue. added hyperbolic.i. rebased to the current mfe…
sshiraiwa Jul 13, 2024
577d7f9
fixed wrong filename
sshiraiwa Jul 13, 2024
cea2c51
fixing VectorFEBoundaryNormalLFIntegrator wrapping. this is a newly …
sshiraiwa Aug 1, 2024
260b43f
Merge pull request #236 from mfem/fix_VectorLFBoundaryNormalIntegrator
sshiraiwa Aug 1, 2024
604ec99
Merge branch 'mfem_47_dev' into fix-ex18-v2
sshiraiwa Aug 1, 2024
00c47be
Merge pull request #234 from mfem/ex39_dev
sshiraiwa Aug 1, 2024
f50f76d
(WIP) making ex18 to conform with the latest
sshiraiwa Aug 3, 2024
edb458f
(WIP) making ex18 to conform with the latest
sshiraiwa Aug 5, 2024
823c1d8
(WIP)
sshiraiwa Aug 5, 2024
566af73
added hyperbolic.i
sshiraiwa Aug 5, 2024
e1d03d2
Merge branch 'fix-ex18-v2' of github.com:/mfem/PyMFEM into fix-ex18-v2
sshiraiwa Aug 5, 2024
30f41d2
ex18 runs. solution looks slightly differet, yet
sshiraiwa Aug 5, 2024
fdd3935
ex18.py should pass test
sshiraiwa Aug 5, 2024
28ba768
fixed ex18p
sshiraiwa Aug 5, 2024
083cd06
Merge pull request #235 from mfem/fix-ex18-v2
sshiraiwa Aug 6, 2024
79341e5
added minor fix to ex23 and ex39p. Ex23 should pass with 4.7 release.…
sshiraiwa Aug 6, 2024
bae0279
(WIP) fixed building mfem with libceed (update version number of libc…
sshiraiwa Aug 6, 2024
4813543
Update build-and-test-dispatch.yml
sshiraiwa Aug 6, 2024
38b2fec
Merge pull request #239 from sshiraiwa/sshiraiwa-patch-1
sshiraiwa Aug 6, 2024
011bb2f
Update build-and-test-dispatch.yml
sshiraiwa Aug 6, 2024
9c79f27
Update build-and-test-callable.yml
sshiraiwa Aug 6, 2024
5125c22
Update build-and-test-dispatch.yml
sshiraiwa Aug 6, 2024
f100218
Update build-and-test-dispatch.yml
sshiraiwa Aug 6, 2024
69246d5
Merge pull request #238 from mfem/fix-example-23-39p
sshiraiwa Aug 6, 2024
84f7257
Merge branch 'master' into mfem_47_dev
sshiraiwa Aug 6, 2024
3364869
fixing invalid workflow error
sshiraiwa Aug 6, 2024
44deb4d
fixing invalid workflow error
sshiraiwa Aug 6, 2024
2efa26b
fixing invalid workflow error
sshiraiwa Aug 6, 2024
2c621d6
fixing invalid workflow error
sshiraiwa Aug 6, 2024
3fc2bc1
Update build-and-test-dispatch.yml
sshiraiwa Aug 6, 2024
d7f6dcd
Merge branch 'mfem_47_dev' into fix-libceed-remove-python37
sshiraiwa Aug 6, 2024
1ab78bd
try some changes to fix cuda installl
justinlaughlin Aug 6, 2024
c33ffcb
try change tmpdir and cuda_home
justinlaughlin Aug 6, 2024
f00966c
Merge pull request #240 from mfem/fix-libceed-remove-python37
sshiraiwa Aug 6, 2024
0d55685
add condition to skip if label='skip-ci'
justinlaughlin Aug 6, 2024
e721fcd
not sure... trying to change permissions with mkdir to see if it helps
justinlaughlin Aug 6, 2024
3f5bda5
add skip-ci
justinlaughlin Aug 6, 2024
e9f7a1a
update changelog.txt
sshiraiwa Aug 6, 2024
2186cd9
whitespace
justinlaughlin Aug 6, 2024
352eae5
try remove tmpdir (only change left is setting env CUDA_HOME)
justinlaughlin Aug 6, 2024
03480d6
try gh action
justinlaughlin Aug 6, 2024
c7955e4
try updating cuda version, and remove unnecessary env vars
justinlaughlin Aug 6, 2024
61096d0
cleanup
justinlaughlin Aug 6, 2024
e3708ce
cleanup unused cuda scripts
justinlaughlin Aug 6, 2024
5921ede
cleanup
justinlaughlin Aug 6, 2024
153df34
change install.txt to markdown, move to root folder, add code blocks …
justinlaughlin Aug 6, 2024
08f5091
minor updates to changelog
justinlaughlin Aug 6, 2024
4b4e7f5
some wordsmithing and cleanup in README.md
justinlaughlin Aug 6, 2024
7d78297
more work on INSTALL.md
justinlaughlin Aug 6, 2024
c135a63
Merge pull request #243 from mfem/add-skip-label-to-ci
sshiraiwa Aug 6, 2024
e1466a6
Merge pull request #241 from mfem/fix-cuda-install
sshiraiwa Aug 6, 2024
45b73e1
merged changes for CI
sshiraiwa Aug 6, 2024
56c2aa8
lots of rewriting install.md, and a little bit of readme.md. WIP
justinlaughlin Aug 7, 2024
4f1ea7e
remove cuda and suitesparse
justinlaughlin Aug 7, 2024
c54a606
remove quotes from master
justinlaughlin Aug 7, 2024
d15b0ef
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
1bb10ca
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
d68073c
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
0accba0
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
eb6869d
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
c230f14
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
bdadbfd
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
824471d
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
fd2b06b
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
52120ac
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
36fa5f2
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
c29fc04
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
31c8aae
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
07a7ea7
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
3dbda36
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
5846198
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
b630210
working on INSTALL.md, removing the senteces regarding pip install + …
sshiraiwa Aug 7, 2024
3e68b55
Merge pull request #246 from mfem/install.md
sshiraiwa Aug 7, 2024
98fb726
Update changelog.txt
sshiraiwa Aug 7, 2024
5e4a954
Update changelog.txt - fix spacing
justinlaughlin Aug 7, 2024
448db6d
Update changelog.txt
justinlaughlin Aug 7, 2024
9a2e7ae
Merge pull request #244 from mfem/mfem_47_doc
sshiraiwa Aug 7, 2024
54ca753
Merge pull request #231 from mfem/mfem_47_dev
sshiraiwa Aug 7, 2024
ac9516c
update release CI scripts
sshiraiwa Aug 7, 2024
55cf62a
update release CI scripts
sshiraiwa Aug 7, 2024
fdde34b
update release CI scripts
sshiraiwa Aug 7, 2024
60454c5
update release CI scripts
sshiraiwa Aug 7, 2024
61be956
removing the current directory from search path in _ser/setup.py and …
sshiraiwa Aug 8, 2024
b6822b0
update version to 4.7.0 for release
sshiraiwa Aug 8, 2024
55f96b9
update version to 4.7.0rc6 for test release
sshiraiwa Aug 8, 2024
49d870b
update version to 4.7.0 for release and update metadata (supported Py…
sshiraiwa Aug 8, 2024
95a58de
update README
sshiraiwa Aug 8, 2024
52ab767
fixing sparsemat and hypre
sshiraiwa Aug 8, 2024
70e00e5
update version number to 4.7.0.1
sshiraiwa Aug 8, 2024
0054c54
Merge pull request #249 from mfem/fix_mfem_real_t
sshiraiwa Aug 9, 2024
1259886
fixing Array2D wrapping
sshiraiwa Aug 16, 2024
da23550
working on memory handling. When Array is an array of MFEM object poi…
sshiraiwa Aug 21, 2024
0f3863a
added typemap... need to remove temporary thisown in array.i (if poss…
sshiraiwa Oct 2, 2024
4056b07
working on memory handling, passing on-the-fly list works
sshiraiwa Oct 3, 2024
dd805be
Merge remote-tracking branch 'origin/fix_array2d' into coefficient-ar…
sshiraiwa Oct 3, 2024
dc74992
added a macro to handle new kernel dispatch marcors
sshiraiwa Oct 4, 2024
ed7d848
adding kernel_dispatch.i to define empty macro
sshiraiwa Oct 4, 2024
5e81cd5
Fixed the name of wrapped Array2D<MFEM object *> object names
sshiraiwa Oct 5, 2024
159ac75
working on mfem4.8
sshiraiwa Apr 8, 2025
6553370
various update of interface files
sshiraiwa Apr 12, 2025
1868584
fixed some examples, remove Py37 from test
sshiraiwa Apr 12, 2025
fb1c3ae
added CMAKE_POLICY_VERSION_MINIMUM=3.5 when building metis
sshiraiwa Apr 12, 2025
d4653e8
added bessel.py, removed numba-scipy from requirement
sshiraiwa Apr 14, 2025
2017fd9
add 3.12 to test..lets'see
sshiraiwa Apr 14, 2025
50e6840
fixed 19p (IterativeSolverMonitor is IterativeSolverController)
sshiraiwa Apr 14, 2025
593550f
Update ex10p.py
sshiraiwa Apr 15, 2025
c0bf021
Temporary test build-and-test-callable.yml
sshiraiwa Apr 15, 2025
8fdbbaa
Temporary: build-and-test-callable.yml
sshiraiwa Apr 16, 2025
fff7e55
Update build-and-test-callable.yml
sshiraiwa Apr 16, 2025
d3ff0aa
Update build-and-test-callable.yml
sshiraiwa Apr 16, 2025
15122a6
Update build-and-test-callable.yml
sshiraiwa Apr 16, 2025
a5d86ec
update workflow for Python3.12
sshiraiwa Apr 21, 2025
69f5d1d
undo the change in ex10p, regading the visualization
sshiraiwa Apr 21, 2025
671e6f2
Merge branch 'mfem_48_dev' into custom_bessel
sshiraiwa Apr 21, 2025
4e3083c
fixed ex25p.py
sshiraiwa Apr 21, 2025
02a22a8
Merge pull request #267 from mfem/custom_bessel
sshiraiwa Apr 22, 2025
0f5fa41
Merge branch 'dpg_dev' into mfem_48_dev
sshiraiwa Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 188 additions & 0 deletions .github/workflows/build-and-test-callable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
# build-and-test-callable.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_call:
inputs:
os:
description: 'Operating system'
type: string
default: 'ubuntu-latest'
python-version:
description: 'Python version'
type: string
default: '3.9'
mfem-branch:
description: 'MFEM branch to checkout'
type: string
default: 'default' # 'default' uses a specific commit hash defined in setup.py:repos_sha
parallel:
description: 'Build parallel version'
type: boolean
default: false
cuda:
description: 'Build with CUDA'
type: boolean
default: false
cuda-toolkit-version:
type: string
default: '12.6.0'
cuda-driver-version:
type: string
default: '560.28.03'
libceed:
description: 'Build with libCEED'
type: boolean
default: false
gslib:
description: 'Build with GSlib'
type: boolean
default: false
phases:
description: 'When true, run each build step individually (mfem, swig, pymfem)'
type: boolean
default: true

jobs:
build-and-test:
runs-on: ${{ inputs.os }}

# Reference for $${{ x && y || z }} syntax: https://7tonshark.com/posts/github-actions-ternary-operator/
name: >-
${{ inputs.os }} |
${{ inputs.mfem-branch }} |
${{ inputs.python-version }} |
${{ inputs.parallel && 'parallel' || 'serial' }}
${{ inputs.cuda && '| cuda' || '' }}${{ inputs.libceed && '| libceed' || '' }}${{ inputs.gslib && '| gslib' || '' }}

env:
CUDA_HOME: '/usr/local/cuda'
# These are all passed to setup.py as one concatenated string
build-flags: >-
${{ inputs.parallel && '--with-parallel' || '' }}
${{ inputs.cuda && '--with-cuda' || '' }}
${{ inputs.libceed && '--with-libceed' || '' }}
${{ inputs.gslib && '--with-gslib' || '' }}
${{ (!(inputs.mfem-branch == 'default') && format('--mfem-branch=''{0}''', inputs.mfem-branch)) || '' }}

# -------------------------------------------------------------------------------------------------
# Begin workflow
# -------------------------------------------------------------------------------------------------
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

# -------------------------------------------------------------------------------------------------
# Download/install dependencies
# -------------------------------------------------------------------------------------------------
- name: Install core dependencies via requirements.txt
run: |
pip install setuptools
pip install -r requirements.txt --verbose

- name: Install MPI
if: inputs.parallel
run: |
sudo apt-get install openmpi-bin libopenmpi-dev
export OMPI_MCA_rmaps_base_oversubscribe=1
# (broken?) sudo apt-get install mpich libmpich-dev
pip install mpi4py
mpirun -np 2 python -c "from mpi4py import MPI;print(MPI.COMM_WORLD.rank)"

- name: Purge PIP chach
run: pip cache purge

- name: Cache CUDA
if: inputs.cuda
id: cache-cuda
uses: actions/cache@v4
with:
path: ~/cache
key: cuda-installer-${{ inputs.cuda-toolkit-version }}-${{ inputs.cuda-driver-version }}

- name: Download CUDA
if: inputs.cuda && steps.cache-cuda.outputs.cache-hit == false
run: |
CUDA_URL="https://developer.download.nvidia.com/compute/cuda/${{ inputs.cuda-toolkit-version }}/local_installers/cuda_${{ inputs.cuda-toolkit-version }}_${{ inputs.cuda-driver-version }}_linux.run"
curl -o ~/cache/cuda.run --create-dirs $CUDA_URL

- name: Install CUDA
if: inputs.cuda
run: |
# The --silent flag is necessary to bypass user-input, e.g. accepting the EULA
sudo sh ~/cache/cuda.run --silent --toolkit
echo "/usr/local/cuda/bin" >> $GITHUB_PATH

- name: Print dependency information
run: |
pip list
printf "\n\n---------- MPI ----------\n"
mpiexec --version || printf "MPI not installed"
printf "\n\n---------- CUDA ----------\n"
nvcc --version || printf "CUDA not installed"

# -------------------------------------------------------------------------------------------------
# Build MFEM + SWIG Bindings + PyMFEM
# -------------------------------------------------------------------------------------------------
- name: Build MFEM (step 1)
if: inputs.phases
run: python setup.py install --ext-only --vv ${{ env.build-flags }}

- name: Build SWIG wrappers (step 2)
if: inputs.phases
run: python setup.py install --swig --vv ${{ env.build-flags }}

- name: Build PyMFEM (step 3)
if: inputs.phases
run: python setup.py install --skip-ext --skip-swig --vv ${{ env.build-flags }}

- name: Build all (steps 1-3)
if: inputs.phases == false
run: python setup.py install --vv ${{ env.build-flags }}

# -------------------------------------------------------------------------------------------------
# Run tests
# -------------------------------------------------------------------------------------------------
- name: Run tests (serial)
if: inputs.parallel == false
run: |
cd test
python run_examples.py -serial -verbose

- name: Run tests (parallel)
if: inputs.parallel
run: |
cd test
python run_examples.py -parallel -verbose -np 2

# -------------------------------------------------------------------------------------------------
# Generate an artifact (output of tests) on failure
# -------------------------------------------------------------------------------------------------
- name: Generate test results artifact
id: generate-artifact
run: |
tar -cvzf sandbox.tar.gz test/sandbox
# generate a name for the artifact
txt=$(python -c "import datetime;print(datetime.datetime.now().strftime('%H_%M_%S_%f'))")
echo name="test_results_"${txt}"_"${{ github.run_id }}".tar.gz" >> $GITHUB_OUTPUT

- name: Upload Artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: ${{ steps.generate-artifact.outputs.name }}
path: sandbox.tar.gz
retention-days: 1
119 changes: 119 additions & 0 deletions .github/workflows/build-and-test-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# build-and-test-dispatch.yml
#
# Dispatch workflow for build-and-test-callable.yml
name: Build and Test (dispatch)

on:
workflow_dispatch:
inputs:
test_options:
type: choice
required: true
description: 'Test all options. If set to false, will only trigger the CI for the default options.'
default: 'defaults'
options:
- 'defaults'
- 'fast'
- 'cuda'
- 'libceed'
- 'gslib'
- 'all'
pull_request:

jobs:
# -------------------------------------------------------------------------------------------------
# Build and test whole matrix of options on linux
# -------------------------------------------------------------------------------------------------
test-linux-serial:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }}
strategy:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] # 3.12 is not supported by scipy
parallel: [false]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: ubuntu-latest
mfem-branch: ${{ matrix.mfem-branch }}
python-version: ${{ matrix.python-version }}
parallel: ${{ matrix.parallel }}

test-linux-parallel:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }}
strategy:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
python-version: ['3.9', '3.10', '3.11', '3.12'] # 3.12 is not supported by scipy
parallel: [true]
name: test-linux | ${{ matrix.mfem-branch }} | ${{ matrix.python-version }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: ubuntu-latest
mfem-branch: ${{ matrix.mfem-branch }}
python-version: ${{ matrix.python-version }}
parallel: ${{ matrix.parallel }}

# -------------------------------------------------------------------------------------------------
# Fast test
# -------------------------------------------------------------------------------------------------
test-fast:
if: ${{ inputs.test_options == 'fast' }}
strategy:
fail-fast: false
matrix:
mfem-branch: [master, default] # 'default' uses a specific commit hash defined in setup.py:repos_sha
parallel: [false, true]
name: test-fast | ${{ matrix.mfem-branch }} | ${{ matrix.parallel && 'parallel' || 'serial' }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: ubuntu-latest
mfem-branch: ${{ matrix.mfem-branch }}
python-version: '3.9'
parallel: ${{ matrix.parallel }}

# -------------------------------------------------------------------------------------------------
# Specific cases (we want these to use defaults, and not expand the dimensions of the matrix)
# -------------------------------------------------------------------------------------------------
test-macos:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' }}
strategy:
fail-fast: false
matrix:
mfem-branch: [master, default]
name: test-macos | ${{ matrix.mfem-branch }}
uses: ./.github/workflows/build-and-test-callable.yml
with:
os: macos-latest
mfem-branch: ${{ matrix.mfem-branch }}

test-cuda:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'cuda'}}
uses: ./.github/workflows/build-and-test-callable.yml
with:
cuda: true
name: test-cuda

test-libceed:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'libceed'}}
uses: ./.github/workflows/build-and-test-callable.yml
with:
libceed: true
name: test-libceed

test-gslib:
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip-ci') || inputs.test_options == 'all' || inputs.test_options == 'gslib'}}
uses: ./.github/workflows/build-and-test-callable.yml
with:
gslib: true
name: test-gslib

# -------------------------------------------------------------------------------------------------
# Build and test defaults
# -------------------------------------------------------------------------------------------------
test-defaults:
if: ${{ github.event_name == 'workflow_dispatch' && inputs.test_options == 'defaults' }}
uses: ./.github/workflows/build-and-test-callable.yml
name: test-defaults
12 changes: 4 additions & 8 deletions .github/workflows/release_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ jobs:
ls -l dist/
#python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --password ${{ secrets.TEST_PYPI_TOKEN }} --username __token__ --verbose dist/*
python3 -m twine upload --password ${{ secrets.PYPI_TOKEN }} --username __token__ --verbose dist/*
make_binary_3_7_8_9_10:
make_binary_3_8_9_10_11:
needs: make_sdist
strategy:
matrix:
pythonpath: ["cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310"]
pythonpath: ["cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311"]

runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
Expand All @@ -59,14 +59,10 @@ jobs:
#
ls -l /opt/python/
export PATH=/opt/python/${{ matrix.pythonpath }}/bin:$PATH
pip3 install six auditwheel twine
pip3 install auditwheel twine
pip3 install urllib3==1.26.6 # use older version to avoid OpenSSL vesion issue

pip3 install numpy==1.21.6
pip3 install numba-scipy
if [ -f requirements.txt ]; then
pip3 install -r requirements.txt
fi
pip3 install -r requirements.txt

CWD=$PWD
yum install -y zlib-devel
Expand Down
Loading