Draft
Conversation
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.
Modify CI Workflows and Add Regression Testing
Summary
This pull request introduces major updates to the CI system and testing infrastructure for tandem. The key changes include:
What's Changed
CI Workflows
Added:
.github/workflows/build-and-test-tandem.yml— Builds and tests across multiple compilers and dimensions.github/workflows/build-dependencies.yml— Builds the Docker image with project dependencies.github/workflows/check-petsc-version.yml— Checks for PETSc version updates and triggers dependency rebuilds.github/workflows/main-workflow.yml— Main entry point that triggers all the workflows in the CI pipelineModified:
clang-format.ymltocheck-clang-format.ymlfor clarityRemoved:
build-tandem.ymlworkflowDocker Support
Dockerfilethat:Testing Infrastructure
conftest.py:Testing
The CI pipeline performs the following:
clang-formatmake test)Test Suite Details
The test suite is divided into C++ Unit Tests for fine-grained component checks and Pytest Integration Tests for overall simulation validation.
Test Directory Structure
Test configurations and generator scripts are maintained directly within the repository to keep tests closely coupled with the code.
reference_configs/: Contains simulation configurations (.toml,.lua,.geo) separated by dimension (2D/,3D/).scripts/: Contains the individual shell scripts used to generate reference output data for each test.test_data/: The destination folder where the externaltandem_test_datarepository is cloned (only when integration tests are enabled).Running the Tests
Basic Unit Tests
By default, compiling the tests will only prepare the local C++ unit tests. Run them using:
make testIntegration Tests (CI)
Integration tests require heavy reference data (meshes, Green's functions,
.vtufiles). Before running them, install the required Python dependencies:Then compile with:
Testing with Custom Data Branches
By default, the CI setup pulls the
masterbranch of thetandem_test_datarepository. If you are developing a new feature and need a custom branch of the test data, you can specify it during configuration using-DTEST_DATA_BRANCH.Example: If you are working on a Tandem branch named
<user-name>/add-feature-1, create a corresponding data branch<user-name>/add-data-for-feature-1in the data repo and compile with:For more test details, please see the README.md inside the test directory.
Notes