libabigail/README-DOCKER.md
Ben Woodard d7557e8c25 Add github actions to support workflows
To facilitate collaboration with developers working on the BUILD-SI
project who are using github, I have been maintaining a clone of the
libabigail repo there. Having this repo also allows us to leverage
some of the tooling that github provides, in particular the ability to
have github actions test patches to verify that the builds succeed,
and all the regression tests run successfully. This will allow it to
better integrate with the normal agile workflow used by at least this
community of developers.

	* .github/workflows/build-container.yaml: New file.
	* .github/workflows/libabigail.yaml: Likewise.
	* .github/workflows/test.yaml: Likewise.
	* .github/workflows/test-fedora.yaml: Likewise.
	* .github/README.md: Likewise.
	* docker/Dockerfile.fedora: Likewise.
	* docker/Dockerfile.ubuntu: Likewise.
	* docker/Dockerfile.fedora-base: Likewise.
	* docker/Dockerfile.test: Likewise.
	* README-DOCKER.md: Likewise.

Signed-off-by: Vanessa Sochat <sochat1@llnl.gov>
Reviewed-by: Ben Woodard <woodard@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2022-05-17 00:13:40 +02:00

1.8 KiB

Libabigail Docker

Libabigail comes with two Dockerfile in docker to build each of:

  • a Fedora base image (recommended)
  • an Ubuntu base image.

These containers are built and deployed on merges to the main branch and releases.

Usage

Here is how to build the containers. Note that we build so it belongs to the same namespace as the repository here. "ghcr.io" means "GitHub Container Registry" and is the GitHub packages registry that supports Docker images and other OCI artifacts.

$ docker build -f docker/Dockerfile.fedora -t ghcr.io/woodard/libabigail-fedora .
$ docker build -f docker/Dockerfile.ubuntu -t ghcr.io/woodard/libabigail-ubuntu-22.04 .

Note that currently the fedora image is deployed to ghcr.io/woodard/libabigail:latest.

Shell

To shell into a container (here is an example with ubuntu):

$ docker run -it ghcr.io/woodard/libabigail-ubuntu-22.04 bash

Off the bat, you can find the abi executables:

# which abidiff
/opt/abigail-env/.spack-env/view/bin/abidiff

Since the ubuntu base uses spack, you can interact with spack. You can go to the environment in /opt/abigail-env and (given you have the source code bound to /src) build and test again.

$ spack install

And that's it! This workflow should make it easy to install development versions of libabigail with spack. We will also use the "production" containers to grab libraries in:

$ ls /opt/abigail-env/.spack-env/view/
bin  include  lib  share

Note that the fedora container does not come with spack.

Testing

We provide a testing container, which will use a fedora base and add new code to compile, and then run make check. You can do this as follows on your local machine:

$ docker build -f docker/Dockerfile.test -t test .