Simplify workflow for Github CI#3194
Conversation
…stic floating-point operations
|
The "serial double-precision" matrix build which involves OpenMP ( These test failures have not been previously detected because the OpenMP build has actually never been tested as part of the CI workflow using GitHub Actions. This is because the meep/.github/workflows/build-ci.yml Lines 157 to 161 in b910074 In order to get the tests to pass for the time being, the |
CI Workflow Improvements: Reducing Test Matrix Redundancies
The current CI matrix runs 4 jobs (2 Python versions$\times$ 2 MPI modes):
--with-openmp--with-openmp--with-openmp--enable-single --enable-swig-python-threadsEach job does
make distcheck, which is expensive: it creates a tarball, extracts it, configures, builds, and runs the full test suite from scratch.Key Finding: The Python version axis adds no value
After examining all 66 Python test files and both Makefiles:
Running the full test suite twice per MPI mode (once per Python version) is pure redundancy.
Recommended changes
1 Reduce matrix from 4 jobs to 3 by dropping duplicate Python-version testing
Replace the 2$\times$ 2 matrix with explicit include entries:
--with-openmp--with-openmp--enable single --enable-swig-python-threadsThis preserves full coverage of the three meaningful configurations (serial, MPI, single-precision) while eliminating the redundant Python 3.9 runs. If minimum Python-version compatibility is important, one job could use 3.9 instead, but it shouldn't duplicate a configuration already tested with 3.11.
2 Cache dependency builds
libctl, harminv, MPB, and libGDSII are built from source on every run but change very rarely. Adding a cache step would save ~5-10 minutes per job.
All four dependencies (libctl, harminv, MPB, libGDSII) would be covered by a single cache key since they are all installed to
~/local. The cache would only rebuild when the workflow file changes.3 Use
make checkinstead ofmake distcheckfor most jobsmake distcheck(creates tarball, extracts, reconfigures, rebuilds, tests) is much more expensive thanmake check(just runs tests against the already-built code). Only one job needs to verify the distribution tarball works. The other jobs can usemake checkto save significant time.Suggested: Run
distcheckon Job 1 (serial) only, usemake checkon Jobs 2-3.