Repository navigation
Add continuous integration with GitHub Actions - #22
Merged
Merged
Conversation
…nux. The workflow builds with scripts/unix/build.sh --no-chrono --external on ubuntu-24.04, runs the chrono-free CTest label and the downstream-consumer check, and uploads the JUnit report and logs. scripts/ci/check_ctest_junit.py fails a run in which a test was skipped or not run. CTest exits with 0 in that case, for example when a Python test returns its SKIP_RETURN_CODE because a package is missing.
…n tests on Linux. scripts/unix/build_chrono.sh builds and installs the pinned Chrono 10.0.0 tag with the portable recipe in docs/build/BUILD_CHRONO.md (Parsers, HDF5, OpenMP, CH_USE_SIMD=OFF, 16-byte Eigen alignment, no Python link) and fails if the installed package exports -march=native. The new workflow job restores that installation from the Actions cache or builds it, builds SEA-Stack with MoorDyn, external modules and demos, and runs the unit, regression and external CTest labels with 2 concurrent tests and 2 OpenMP threads each. scripts/unix/ctest_suite.sh gains --junit FILE, which passes --output-junit to ctest; behaviour without the option is unchanged.
…tion. The Linux job gains the verification, comparison and long regression suites, the demo cases against their baselines (run_tests.py --all), and the benchmarks. They run on the nightly schedule (testing dev), on a manual run, and on a pull request labelled full-tests; other runs stop after the unit, regression and external tests. The full run installs pandoc and LaTeX so that the suite scripts write PDF reports, and fails if a PDF is missing, because the report generators continue when the conversion fails. Benchmarks do not fail the job: timings on shared runners are for information only. Reports and their figures are uploaded as an artifact.
Both workflow jobs now run on ubuntu-24.04 and macos-15 (Apple silicon). The macOS jobs install eigen@3, hdf5 and libomp from Homebrew and pass their keg-only prefixes to CMake through CMAKE_PREFIX_PATH. PDF reports are written on Linux only. scripts/unix/build_chrono.sh sets CH_USE_EIGEN_OPENMP=OFF on macOS, as in the released macOS packages, and accepts extra CMake configure arguments after --. The Chrono cache key now includes the compiler version and, on macOS, the versions of the Homebrew libraries that Chrono links.
Chrono 10.0.0 sets CMAKE_MACOSX_RPATH OFF and no install-name directory, so its installed libraries carry a bare file name as install name (libChrono_core.dylib). Programs linked against the installation then fail to start with 'dyld: Library not loaded'; every Chrono-linked test in the macOS continuous integration job stopped this way. scripts/unix/build_chrono.sh now passes CMAKE_INSTALL_NAME_DIR=<prefix>/lib on macOS and checks after installing that no library is recorded without a path.
test_external_pto_rm3_regression runs four irregular-wave simulations through run_seastack but is registered in tests/unit, so it inherited the 300 s limit of the unit tests. On the macOS continuous integration runner it was stopped at 300 s, and on the Linux runner the external label takes about 210 s. The test now sets TIMEOUT 1800, the limit of the regression suite. The limit of every other test is unchanged.
The output summary read .Count on the result of Get-ChildItem. Under strict mode that is an error when there is no match, so build.ps1 -NoChrono exited with 1 after a successful build into a clean tree, where the output folder holds no DLLs. The results are now wrapped in @(...).
run_unit_tests.ps1, run_chrono_free_tests.ps1, run_regression_tests.ps1, run_verification_tests.ps1 and run_comparison_tests.ps1 pass --output-junit to ctest when -Junit <file> is given, as scripts/unix/ctest_suite.sh does with --junit. Behaviour without the option is unchanged.
scripts/windows/build_chrono.ps1 builds and installs the pinned Chrono 10.0.0 tag with Parsers, HDF5 and OpenMP and no Python link, taking Eigen and HDF5 from vcpkg. Chrono 10.0.0 links hdf5::hdf5_tools-shared whenever the HDF5 package config provides hdf5::hdf5-shared. vcpkg's HDF5 does not export that target, so the documented Windows configure stopped with 'target was not found'. cmake/ChronoHdf5ToolsShim.cmake defines the missing target and is passed to the Chrono configure through CMAKE_PROJECT_INCLUDE. docs/build/BUILD_CHRONO.md describes both scripts, the shim, the hl feature of vcpkg's HDF5 that Chrono needs, and the macOS install-name setting.
Two jobs on windows-2022 mirror the Linux and macOS jobs through the PowerShell entry points: a Chrono-free build with its tests and the downstream-consumer check, and a Chrono build with the unit, regression and external tests plus the full suites on request. Eigen and HDF5 come from the vcpkg checkout on the runner, with its binary archives cached; Chrono is built by scripts/windows/build_chrono.ps1 and cached. In the Chrono-free job the vcpkg bin folder is put on PATH, because the HDF5 DLLs are only copied next to the tests in a Chrono build.
…oved. The first Windows run built and installed Chrono, then failed on Remove-Item with 'The directory is not empty' while deleting the temporary source and build folder, before the installation was cached. The folder is now removed on a best-effort basis. The Chrono build output is also written to chrono-build.log and uploaded with the test results, so that a failed Chrono build can be diagnosed from the artifact.
…LIB. On the windows-2022 runner the SEA-Stack configure stopped in find_package(HDF5): vcpkg's hdf5-config.cmake could not find its ZLIB dependency. The build-config.json written by the Windows Chrono job now sets CMakePrefixPath to the vcpkg installed tree, as docs/build/BUILD_WINDOWS.md describes and as the Chrono-free job already does.
The help text contained a backtick followed by 'u' inside a double-quoted string. PowerShell 7 reads that as the start of a Unicode escape and rejects the whole script with a parser error; Windows PowerShell 5.1 ignores the backtick. The backticks are removed, which leaves the 5.1 output unchanged.
…nuous integration. On the windows-2022 runner the regression test programs stopped with 0xc0000135 (DLL not found). They load HDF5 and its dependencies from the output folder, where build.ps1 copies hdf5*, szip* and zlib* only. The Windows Chrono job now copies any other DLL from the vcpkg bin folder into the output folder and records what was staged, what was copied and what hdf5.dll and szip.dll import in staged-dlls.txt, uploaded with the test results.
Newer vcpkg releases ship zlib as libz.dll instead of zlib1.dll, and hdf5.dll imports it by that name. build.ps1 copied only zlib*.dll next to the executables, so on a current vcpkg every Chrono-linked test stopped with 0xc0000135 (DLL not found), as seen on the windows-2022 continuous integration runner. The install rule for the Windows package listed only zlib1.dll, so a package built with a current vcpkg would lack zlib and run_seastack.exe would not start. Both now also take libz.dll. Each copies or installs only the files that exist, so older vcpkg trees are handled as before.
…egration. The Windows Chrono job copied every vcpkg DLL that build.ps1 had not staged, which hid the libz.dll naming problem from the project's own staging. The step now only checks: it fails with the name of the missing file if a vcpkg DLL staged next to the tests imports another vcpkg DLL that was not staged, and records the listing in staged-dlls.txt.
…t guide. tests/README.md lists what each continuous integration job builds and runs, when the full suites run, that a skipped test fails a run, and what is uploaded. Its suite table now states when each suite runs in continuous integration and includes the external label. CONTRIBUTING.md points to it and states what to do when a test fails on one platform only.
The job passes only if every build and test job passed. Requiring this one status keeps the branch protection settings independent of the list of platforms and jobs.
dav-og
marked this pull request as ready for review
December 2, 2026 13:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The workflow builds with scripts/unix/build.sh --no-chrono --external on ubuntu-24.04, runs the chrono-free CTest label and the downstream-consumer check, and uploads the JUnit report and logs.
scripts/ci/check_ctest_junit.py fails a run in which a test was skipped or not run. CTest exits with 0 in that case, for example when a Python test returns its SKIP_RETURN_CODE because a package is missing.