Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplification of the definition of projects to run in GitHub actions #242

Merged

Conversation

vincent-noel
Copy link
Collaborator

I wrote a simpler version of the GitHub actions, using what's called a matrix: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs

We define the list of projects to run like this:

projects: [
          {project: "virus-macrophage-sample", name: "Virus Macrophage", binary: "virus-sample"},
          {project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines"},
          {project: "physimess-sample", name: "PhysiMeSS Sample", binary: "project"},
          {project: "physimess-sample", name: "PhysiMeSS Sample", binary: "project", config: "config/Fibre_Initialisation/mymodel_initialisation.xml"},
          {project: "physimess-sample", name: "PhysiMeSS Sample", binary: "project", config: "config/Cell_Fibre_Mechanics/mymodel_rotating.xml"},
          {project: "template", name: "PhysiCell Template", binary: "project"}
]

Each element needs a project, which is the name used when running make <project>, a name, the filename of the binary file, and the optional path of a config file.
This needs to be set up for all the different runners: macos-12 (x86_64), macos-14 (arm64), linux, windows. But the syntax is exactly the same.

@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch 5 times, most recently from d1f72e7 to ac7e12e Compare June 4, 2024 17:39
@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch from 712ebb8 to cd1032d Compare June 28, 2024 18:41
@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch from cd1032d to daa5546 Compare June 28, 2024 18:43
@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch 10 times, most recently from c3ec550 to 44eea88 Compare August 12, 2024 21:16
@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch from 44eea88 to 05417a5 Compare August 12, 2024 21:43
@vincent-noel
Copy link
Collaborator Author

vincent-noel commented Aug 12, 2024

Now I have tests which also compare the first SVG from the output to some reference, stored in tests/cases/output_{project_name}.
Projects are defined like this :

projects: [
   {project: "template", name: "PhysiCell Template", binary: "project", max_time: 120, config: "config/PhysiCell_settings.xml", output_folder: "output"},
   {project: "heterogeneity-sample", name: "PhysiCell Heterogeneity", binary: "heterogeneity", max_time: 99, config: "config/PhysiCell_settings.xml", output_folder: "output"},
   {project: "template_BM", name: "PhysiBoSS Template", binary: "project", max_time: 120, config: "config/PhysiCell_settings.xml", output_folder: "output"},
   {project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", max_time: 120, config: "config/PhysiCell_settings.xml", output_folder: "output"},
]

So basically the same as above, plus a max_time, and an output folder. This will compare all the SVGs generated in the output folder until max_time, to their reference. So a new project needs a new definition here, plus the reference SVGs.

It compiles the project, and then use two scripts based on Randy's work:

  • One which modifies the XML definition to use only one core, and limit the simulation time to max_time (beta/test_run_sample.py)
  • One which runs the diff tools, and checks the result (beta/test_diff_svg.py)

@vincent-noel vincent-noel force-pushed the feat/simplified_actions branch from 11086b0 to eeb7816 Compare August 13, 2024 11:14
@MathCancer MathCancer merged commit deca114 into MathCancer:development Aug 16, 2024
48 checks passed
@vincent-noel vincent-noel deleted the feat/simplified_actions branch September 11, 2024 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants