48 Build, Test, and CI
Use a debug build with unit tests for local development:
A Fortran compiler is required for the fetched reference LAPACK backend (for example gfortran). CMake downloads BLAS, LAPACK and LAPACKE from the pinned Reference-LAPACK 3.12.1 archive and verifies its SHA-256. These libraries build under the build directory’s _deps/; a system LAPACK installation is not needed. Use -DCMAKE_Fortran_COMPILER=/path/to/compiler to select a compiler explicitly. The dependency is static, position-independent, real double precision with the 32-bit integer interface. Its own tests and examples are disabled; OPALX includes eigenpair and coupled-map tests. LAPACK’s upstream Fortran optimization policy is retained; it does not change OPALX’s C++ Release flags.
The backend is host-side and serial, even in GPU builds. It introduces no GPU copies or MPI collectives into optics. Runtime deployments must provide the selected Fortran compiler runtime (for GNU on Ubuntu, libgfortran5). CI build jobs install the compiler; the serial smoke-test job installs its runtime.
cmake -S . -B build_serial \
-DCMAKE_BUILD_TYPE=Debug \
-DPLATFORMS=SERIAL \
-DOPALX_ENABLE_UNIT_TESTS=ON
cmake --build build_serial -j 8
ctest --test-dir build_serial --output-on-failureRepeat relevant tests with OPENMP and the target accelerator backend. A test that passes only on the serial backend is not sufficient for a performance-portable change.
Pull-request CI runs only on non-draft pull requests to master and only for the newest commit. The clang-format check and the serial debug build with unit tests run on every such pull request; the serial build is the only required check. The OpenMP build with unit tests, the CUDA, HIP, and SYCL compilation, and the serial smoke tests run only with the smoke-compile-checks label; add it when the change is ready for those checks. The smoke tests run fast regression cases and compare their results to maintained, trusted references.