Seeking Advice on Pre-built SWI-Prolog with Janus Python Interface for GitHub Actions

Hello SWI-Prolog Community,

I’m reaching out to gather insights and recommendations on a more efficient setup for SWI-Prolog with the Janus Python interface in our GitHub Actions pipeline. Currently, our setup involves building SWI-Prolog from source each time we run our tests, integrating it with Janus. This process is quite CPU-intensive and time-consuming, which is becoming a bottleneck in our CI/CD process.

Perhaps I am basing the need to build SWI-Prolog from source on outdated information that this is required to get Janus support working:

  1. PPAs: Are there any PPAs available that provide SWI-Prolog with Janus already working?
  2. Docker: Does anyone know of Docker images with Janus already working?
  3. Snap Packages: Are there Snap packages available that include both SWI-Prolog and Janus preconfigured, and are they regularly updated?
  4. Other Efficient CI/CD Setups: If none of the above options are viable, what other methods or best practices might you recommend for deploying SWI-Prolog with Janus in a way that minimizes build times in CI environments?

Any advice or pointers towards resources, community projects, or potential solutions would be greatly appreciated. We are looking to reduce the overhead involved in our current testing setup.

Thank you all for your time and assistance. I look forward to any suggestions or guidance you might offer.

Best regards,

Douglas

From SWI-Prolog -- Janus on Linux

On Linux systems we bind to the currently installed Prolog and Python version. This should work smoothly from source. Janus is included in the PPA distribution for Ubuntu as well as in the Docker images. It is currently not part of the SNAP distribution.

OK, I confirmed this is working for me. In the past i’ve been on Linux distro versions that were unhappy with whatever PPAs had available… But at least, right now, everything is stellar in with Github Workflow VM and the PPA from 8/14/2024 :slight_smile:

1 Like

Yes, the PPA would be my suggestion. Docker works technically as well, but you’ll have to make the Dockerfile yourself (just that the standard and add python-devel to the dependencies) and host it on e.g., Docker hub.

I think you could also build SWI-Prolog on a compatible system and use cpack to create a .deb or .rpm installer (depending on the Linux distro of choice). Host that somewhere and download and install it in the CI. Never tried that.

1 Like