Skip to content

Update to CI scripts use new images #13

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Update to CI scripts use new images #13

wants to merge 2 commits into from

Conversation

joakimono
Copy link
Contributor

  • This work updates workflow actions to use Debian and Ubuntu container images for gcc 11, 12, 13, 14, where the gcc version used matches the distro's default gcc version;
  • The readme is updated to use the new sintef conan remote, which is https://package.smd.sintef.no;
  • For MSVC toolsets 192 and 194 are built, since 193 is not available in github actions;
  • Also, a minor change to the conan recipe is added to ensure that the git URL in conandata.yml is https://github.com/viproma/cppfmu.

    - Sintef conan remote has changed and is updated in the readme
    - Bump VM images as well as containers that build packages
    - Running Ubuntu 16 images in github actions is no longer possible
    - A slight adjustment to compiler versions being used for gcc an msvc
@kyllingstad
Copy link
Member

kyllingstad commented Mar 20, 2025

I believe that the conanio images are based on an old Linux distro for a reason, namely to avoid Glibc incompatibility issues. We've actually run into a case like this in open-simulation-platform/libcosim#783 (see this comment in particular), where proposed new Libcosim tests are failing because they use FMUs which are compiled against a newer Glibc version. What are your thoughts on this?

@joakimono
Copy link
Contributor Author

joakimono commented Mar 21, 2025

What are your thoughts on this?

Using conanio images still is the robust solution to avoid Glibc incompatibility issues. However, they can no longer run on Github-hosted runners due to, ironically: Glibc issues, see this Github blogpost. I made several efforts to work around this problem, but eventually there was no (simple) way of using the conanio images directly in Github Actions.

The justification for using Linux distros as base images is that the Glibc version will match if using the corresponding default compiler version for a given distro. This if course is only valid for Debian-based distros. It will also fail if the compiled library is attempted used in an older distro, e.g. a Ubuntu 16-based conanio image.

There are a several caveats using conanio images:

  • It is discouraged by conan-io; they recommend building own images
  • Most images are labelled as deprecated
  • New compilers are not available, e.g. gcc 14
  • They won't run directly in Github Actions

In the case of cppfmu, not using an ancient distro is in my opinion not a big issue due to several reasons

  • It is always a dependency for some FMU, whose developer then becomes responsible for distributing its FMU built with appropriately old Glibc version
  • It is open source and lightweight and can easily be rebuilt by the consumer

An alternative approach is to follow the pattern used in libcosim's Github Actions, where the image is run indirectly, but this adds some more complexity to the workflow files. It will not work for gcc 14.

Copy link
Member

@kyllingstad kyllingstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'm convinced. :)

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