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

Setup dummy X server for CI tests #201

Merged
merged 6 commits into from
Dec 19, 2024
Merged

Setup dummy X server for CI tests #201

merged 6 commits into from
Dec 19, 2024

Conversation

gipert
Copy link
Member

@gipert gipert commented Dec 18, 2024

  • tests/docs dependencies are already available in the base image (see recent changes to https://github.com/gipert/remage-docker)
  • use Xvfb to start a dummy X server -> enables Geant4 visualization
  • upload test output files matching pattern *.output.* to GitHub as artifacts

@ManuelHu
Copy link
Collaborator

I wouldn't remove the test skipping. This should be fine, and not skip the tests when X11 is available, so not strictly required here...?

And running the tests on clusters or servers without X access available (or necessary) should still be easy and supported, in my opinion ("easy" as in not having to remember the ctest options... btw, ctest does not check what is passed as commandline arguments, it happily ignores all invalid/mistyped flags 🙄.)

@gipert
Copy link
Member Author

gipert commented Dec 18, 2024

I wouldn't remove the test skipping. This should be fine, and not skip the tests when X11 is available, so not strictly required here...?

yes, I just wanted to be extra sure for testing. We are leaving it there

Something weird is going on on some containers:

 -------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : opengl1001
      issued by : G4OpenGLStoredSceneHandler::AddPrimitivePreambleInternal
Error attempting to create an OpenGL display list.
Current display list id: 257
Maybe out of memory?
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------

and

 GL2PS info: OpenGL feedback buffer overflow
GL2PS info: OpenGL feedback buffer overflow
GL2PS info: OpenGL feedback buffer overflow
GL2PS info: OpenGL feedback buffer overflow
GL2PS info: OpenGL feedback buffer overflow
GL2PS info: OpenGL feedback buffer overflow

I will try installing the Mesa stuff

@ManuelHu
Copy link
Collaborator

The GL2PS warnings can be ignored, they are always there. I never got GL2PS working without warnings, if it works at all...

@ManuelHu
Copy link
Collaborator

ManuelHu commented Dec 18, 2024

If we could skip the test on G4 11.0, we could use TOOLSSG_OFFSCREEN starting with 11.1:
https://geant4.web.cern.ch/documentation/dev/bfad_html/ForApplicationDevelopers/Visualization/visdrivers.html#visdrv-toolssg

TOOLSSG_OFFSCREEN should also work in slim, where no X11 or OpenGL support is compiled into the base image...

edit: but this still uses OpenGL, so not sure if it realiably works in CI...

@ManuelHu
Copy link
Collaborator

ManuelHu commented Dec 18, 2024

11.0 seems also to be broken with a navigaton bug anyway, unrelated to visualization

@ManuelHu
Copy link
Collaborator

or maybe OGLIX works? this apparently fixed a similar problem once: https://geant4-forum.web.cern.ch/t/opengl-issues-after-recent-ubuntu-update/10967

@gipert gipert force-pushed the ci-dev branch 2 times, most recently from a4d47ec to 2d57553 Compare December 19, 2024 13:21
@gipert gipert marked this pull request as ready for review December 19, 2024 14:43
@gipert gipert added the validation Validation and tests label Dec 19, 2024
@ManuelHu
Copy link
Collaborator

ManuelHu commented Dec 19, 2024

Warning: No files were found with the provided path: build/tests/**/*.output.*. No artifacts will be uploaded.

doesn't the ogl viewer add some numeric suffix to export filenames? i.e. you would need build/tests/**/*.output* (note the missing dot!)...?
(I did not test this :-)

@gipert
Copy link
Member Author

gipert commented Dec 19, 2024

Guess what... Geant4 does not want anyone to tell it what it has to do...

complex-volume.output_0000.pdf

@gipert
Copy link
Member Author

gipert commented Dec 19, 2024

Seems to work. Test outputs can be downloaded from here: https://github.com/legend-exp/remage/actions/runs/12416324939

@gipert gipert merged commit 99efc8b into main Dec 19, 2024
5 checks passed
@gipert gipert deleted the ci-dev branch December 19, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation Validation and tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants