From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by sourceware.org (Postfix) with ESMTPS id 9C1DA3857407 for ; Mon, 16 May 2022 22:18:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C1DA3857407 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=seketeli.org Received: (Authenticated sender: dodji@seketeli.org) by mail.gandi.net (Postfix) with ESMTPSA id 3A58D60003; Mon, 16 May 2022 22:17:58 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 30ABF581C3D; Tue, 17 May 2022 00:17:58 +0200 (CEST) From: Dodji Seketeli To: Ben Woodard via Libabigail Cc: Ben Woodard , Vanessa Sochat Subject: Re: [PATCH] V3 Add github actions to support workflows Organization: Me, myself and I References: <20220516163443.2315513-1-woodard@redhat.com> X-Operating-System: Fedora 36 X-URL: http://www.seketeli.net/~dodji Date: Tue, 17 May 2022 00:17:57 +0200 In-Reply-To: <20220516163443.2315513-1-woodard@redhat.com> (Ben Woodard via Libabigail's message of "Mon, 16 May 2022 09:34:43 -0700") Message-ID: <871qwtunoq.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 May 2022 22:18:08 -0000 Hello Vanessa & Ben, Ben Woodard via Libabigail a =C3=A9crit: [...] Thanks for the patch! I have applied to master. > 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. > > * add .github/workflows/build-container.yaml > * add .github/workflows/libabigail.yaml > * add .github/workflows/test.yaml > * add .github/workflows/test-fedora.yaml > * add docker/Dockerfile.fedora > * add docker/Dockerfile.ubuntu > * add docker/Dockerfile.fedora-base > * add docker/Dockerfile.test > * add README-DOCKER.md > * add .github/README.md I have changed this ChangeLog part to make it comply with the format laid out at https://sourceware.org/git/?p=3Dlibabigail.git;a=3Dblob;f=3DCOMMIT-LOG-GUID= ELINES. Basically, the file name comes first, followed by a colon and a description to what's done to the file. Also, before each "*", there is a tab. Please find below the patch that was applied to master. Thanks! >From d7557e8c25b118f75e0f79f6fafbe50360759d4a Mon Sep 17 00:00:00 2001 From: Ben Woodard Date: Mon, 16 May 2022 09:34:43 -0700 Subject: [PATCH] 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 Reviewed-by: Ben Woodard Signed-off-by: Dodji Seketeli --- .github/README.md | 7 ++ .github/workflows/build-container.yaml | 99 +++++++++++++++++++ .github/workflows/libabigail.yaml | 126 +++++++++++++++++++++++++ .github/workflows/test-fedora.yaml | 65 +++++++++++++ .github/workflows/test.yaml | 34 +++++++ README-DOCKER.md | 66 +++++++++++++ docker/Dockerfile.fedora | 38 ++++++++ docker/Dockerfile.fedora-base | 21 +++++ docker/Dockerfile.test | 28 ++++++ docker/Dockerfile.ubuntu | 30 ++++++ 10 files changed, 514 insertions(+) create mode 100644 .github/README.md create mode 100644 .github/workflows/build-container.yaml create mode 100644 .github/workflows/libabigail.yaml create mode 100644 .github/workflows/test-fedora.yaml create mode 100644 .github/workflows/test.yaml create mode 100644 README-DOCKER.md create mode 100644 docker/Dockerfile.fedora create mode 100644 docker/Dockerfile.fedora-base create mode 100644 docker/Dockerfile.test create mode 100644 docker/Dockerfile.ubuntu diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 00000000..255d9a27 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,7 @@ +# Github automations + +Github provides several CI/CD features that some people find +useful. This directory enables those features for people who want to +use them. More information about the layout of this directory and how +to make use of these features can be found here: +https://docs.github.com/en/actions diff --git a/.github/workflows/build-container.yaml b/.github/workflows/bui= ld-container.yaml new file mode 100644 index 00000000..5b2737ba --- /dev/null +++ b/.github/workflows/build-container.yaml @@ -0,0 +1,99 @@ +name: Build Deploy Container + +on: + + # Always have a base image ready to go - this is a nightly build + schedule: + - cron: 0 3 * * * + + # Allow manual trigger of a build + workflow_dispatch: + inputs: + whatever: + description: 'This variable does not matter, its a GHA bug.' + + # On push to main we build and deploy images + push: + branches: + - develop + + # Do build to test works on PR + pull_request: [] + + # Publish packages on release + release: + types: [published] + +jobs: + build: + permissions: + packages: write + strategy: + fail-fast: false + matrix: + + # Dockerfiles to build, container names to use, and to tag as liba= bigail:latest? + container: [["Dockerfile.fedora", "ghcr.io/woodard/libabigail-fedo= ra", true], + ["Dockerfile.ubuntu", "ghcr.io/woodard/libabigail-ubun= tu-22.04", false], + ["Dockerfile.fedora-base", "ghcr.io/woodard/libabigail= -fedora-base", false]] + + runs-on: ubuntu-latest + name: Build + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Make Space For Build + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + + # It's easier to reference named variables than indexes of the matr= ix + - name: Set Environment + env: + dockerfile: ${{ matrix.container[0] }} + uri: ${{ matrix.container[1] }} + isLatest: ${{ matrix.container[2] }} + run: | + echo "dockerfile=3D$dockerfile" >> $GITHUB_ENV + echo "uri=3D$uri" >> $GITHUB_ENV + echo "isLatest=3D$isLatest" >> $GITHUB_ENV + + - name: Pull previous layers for cache + run: docker pull ${uri}:latest || echo "No container to pull" + + - name: Build Container + run: | + container=3D$uri:latest + docker build -f docker/${dockerfile} -t ${container} . + if [[ "${isLatest}" =3D=3D "true" ]]; then docker= tag ${container} ghcr.io/woodard/libabigail:latest + fi + echo "container=3D$container" >> $GITHUB_ENV + + - name: GHCR Login + if: (github.event_name !=3D 'pull_request') + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Deploy + if: (github.event_name !=3D 'pull_request') + run: | + docker push ${container} + if [[ "${isLatest}" =3D=3D "true" ]]; then + docker push ghcr.io/woodard/libabigail:latest + fi + + - name: Tag and Push Release + if: (github.event_name =3D=3D 'release') + run: | + tag=3D${GITHUB_REF#refs/tags/} + echo "Tagging and releasing ${uri}:${tag}" + docker tag ${uri}:latest ${uri}:${tag} + docker push ${uri}:${tag} + if [[ "${isLatest}" =3D=3D "true" ]]; then + docker tag ${uri}:latest ghcr.io/woodard/libabigail:${tag} + docker push ghcr.io/woodard/libabigail:${tag} + fi diff --git a/.github/workflows/libabigail.yaml b/.github/workflows/libabiga= il.yaml new file mode 100644 index 00000000..a7c40d27 --- /dev/null +++ b/.github/workflows/libabigail.yaml @@ -0,0 +1,126 @@ +name: Libabigail ABI Checks +on: + pull_request: [] + +jobs: + +# get-release: +# container: ghcr.io/woodard/libabigail-ubuntu-22.04:latest +# runs-on: ubuntu-latest +# steps: +# - name: Organize Files +# run: | +# mkdir -p /abi +# cp /opt/abigail-env/.spack-env/view/lib/libabigail.so /abi/ +# cp /lib/x86_64-linux-gnu/libc.so.6 /abi/ +# cp /lib/x86_64-linux-gnu/libstdc++.so.6 /abi/ +# cp /lib/x86_64-linux-gnu/libsystemd.so.0 /abi/ + +# - name: Upload Libs +# uses: actions/upload-artifact@v3 +# with: +# name: release-libs +# path: | +# /abi/libabigail.so +# /abi/libc.so.6 +# /abi/libstdc++.so.6 +# /abi/libsystemd.so.0 + + + get-latest: + container: ghcr.io/woodard/libabigail-ubuntu-22.04:latest + runs-on: ubuntu-latest + steps: + - name: Organize Files + run: | + mkdir -p /abi + cp /opt/abigail-env/.spack-env/view/lib/libabigail.so /abi/ + cp /lib/x86_64-linux-gnu/libc.so.6 /abi/ + cp /lib/x86_64-linux-gnu/libstdc++.so.6 /abi/ + cp /lib/x86_64-linux-gnu/libsystemd.so.0 /abi/ + + - name: Upload Libs + uses: actions/upload-artifact@v3 + with: + name: latest-libs + path: | + /abi/libabigail.so + /abi/libc.so.6 + /abi/libstdc++.so.6 + /abi/libsystemd.so.0 + + get-pr: + container: ghcr.io/woodard/libabigail-ubuntu-22.04:latest + runs-on: ubuntu-latest + steps: + - name: Build Pull Request + uses: actions/checkout@v3 + - name: Build + run: | + rm -rf /src + cp -R $PWD /src + ls /src + . /opt/spack/share/spack/setup-env.sh + cd /opt/abigail-env + spack install + + - name: Organize Files + run: | + mkdir -p /abi + cp /opt/abigail-env/.spack-env/view/lib/libabigail.so /abi/ + cp /lib/x86_64-linux-gnu/libc.so.6 /abi/ + cp /lib/x86_64-linux-gnu/libstdc++.so.6 /abi/ + cp /lib/x86_64-linux-gnu/libsystemd.so.0 /abi/ + + - name: Upload Libs + uses: actions/upload-artifact@v3 + with: + name: pr-libs + path: | + /abi/libabigail.so + /abi/libc.so.6 + /abi/libstdc++.so.6 + /abi/libsystemd.so.0 + + abi: + runs-on: ubuntu-latest + needs: [get-latest, get-pr] # get-release + strategy: + fail-fast: false + matrix: + + # Testing every paired library for release vs pr and main vs. pr + libs: ["libabigail.so", + "libc.so.6", + "libstdc++.so.6", + "libsystemd.so.0"] + + # Artifact pairs (named) for comparison) + artifacts: [["pr-libs", "latest-libs"]] + #["pr-libs", "release-libs"]] + + steps: + - name: Download Previous Version + uses: actions/download-artifact@v2 + with: + name: ${{ matrix.artifacts[1] }} + path: previous/ + + - name: Download Pull Request Version + uses: actions/download-artifact@v2 + with: + name: ${{ matrix.artifacts[0] }} + path: current/ + + - name: Show Files + run: | + ls current/ + ls previous/ + + - name: Run Libabigail + uses: buildsi/libabigail-action@0.0.11 + env: + lib: ${{ matrix.libs }} + with: + abidiff: previous/${{ env.lib }} current/${{ env.lib }} + abidw: "--abidiff current/${{ env.lib }}" diff --git a/.github/workflows/test-fedora.yaml b/.github/workflows/test-fe= dora.yaml new file mode 100644 index 00000000..a0d2583f --- /dev/null +++ b/.github/workflows/test-fedora.yaml @@ -0,0 +1,65 @@ +name: Libabigail ABI Diff Checks +on: + pull_request: [] + +jobs: + abi: + runs-on: ubuntu-latest + container: ghcr.io/woodard/libabigail + strategy: + fail-fast: false + matrix: + + # Pairs of path and install command + libs: [["/lib64/libabigail.so", "libabigail"], + ["/lib64/libadwaitaqtpriv.so", "libadwaita-qt5"], + ["/lib64/libaspell.so", "aspell"], + ["/lib64/libboost_log.so", "boost-log"], + ["/lib64/libclucene-core.so", "clucene-core"], + ["/lib64/libdap.so", "libdap"], + ["/lib64/libdcerpc-samr.so", "samba-libs"], + ["/lib64/libdjvulibre.so", "djvulibre-libs"], + ["/lib64/dovecot/libdovecot-storage.so", "dovecot"], + ["/lib64/libexiv2.so", "exiv2-libs"], + ["/lib64/libgdal.so", "gdal-libs"], + ["/lib64/libgeos.so", "geos"], + ["/lib64/libglibmm-2.4.so", "glibmm24"], + ["/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed/l= ibgmpopenh264.so", "mozilla-openh264"], + ["/lib64/libhdf5_cpp.so", "hdf5"], + ["/lib64/libicui18n.so", "libicu67"], + ["/lib64/libicui18n.so", "libicu"], + ["/lib64/libicuuc.so", "libicu67"], + ["/lib64/libicuuc.so", "libicu"], + ["/lib64/dyninst/libinstructionAPI.so", "dyninst"], + ["/lib64/libjavascriptcoregtk-4.0.so", "webkit2gtk3-jsc"], + ["/lib64/libjxl.so", "libjxl"], + ["/lib64/libkmldom.so", "libkml"], + ["/lib64/libmusicbrainz5.so", "libmusicbrainz5"], + ["/lib64/libOpenEXRUtil-3_1.so", "openexr-libs"], + ["/lib64/libopenh264.so", "openh264"], + ["/lib64/libOSMesa.so", "mesa-libOSMesa"], + ["/lib64/libproj.so", "proj"], + ["/lib64/libQt5WaylandClient.so", "qt5-qtwayland"], + ["/lib64/libQt5WaylandCompositor.so", "qt5-qtwayland"], + ["/lib64/libQt5XmlPatterns.so", "qt5-qtxmlpatterns"], + ["/lib64/libSDL2_image-2.0.so", "SDL2_image"], + ["/lib64/libstdc++.so", "libstdc++"], + ["/lib64/libtag.so", "taglib"], + ["/lib64/libreoffice/program/libuno_cppuhelpergcc3.so", "li= breoffice-ure"], + ["/lib64/libvtkRenderingCore.so", "vtk"], + ["/lib64/libwebrtc_audio_processing.so", "webrtc-audio-proc= essing"]] + steps: + - name: Install Library + env: + lib: ${{ matrix.libs[1] }} + run: dnf install -y ${lib} findutils + + - name: Run abidw abidiff + env: + libpath: ${{ matrix.libs[0] }} + run: | + for name in $(find -type f $libpath*); do + printf "abidw --abidiff ${name}\n" + abidw --abidiff ${name} + echo $? + done diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..1b16ea12 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,34 @@ +name: Test Libabigail + +on: + pull_request: [] + push: + branches: + - develop + +jobs: + build: + permissions: + packages: read + strategy: + fail-fast: false + matrix: + + # Testing containers (build and run make check) + dockerfile: ["Dockerfile.test"] + + runs-on: ubuntu-latest + name: Build + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Make Space For Build + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + + - name: Build Test Container + env: + dockerfile: ${{ matrix.dockerfile }} + run: docker build -f docker/${dockerfile} -t libabigail-test . diff --git a/README-DOCKER.md b/README-DOCKER.md new file mode 100644 index 00000000..ad2dd8e1 --- /dev/null +++ b/README-DOCKER.md @@ -0,0 +1,66 @@ +# Libabigail Docker + +Libabigail comes with two Dockerfile in [docker](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 r= eleases. + +### Usage + +Here is how to build the containers. Note that we build so it belongs to t= he same +namespace as the repository here. "ghcr.io" means "GitHub Container Regist= ry" and +is the [GitHub packages](https://github.com/features/packages) registry th= at supports + Docker images and other OCI artifacts. + +```bash +$ docker build -f docker/Dockerfile.fedora -t ghcr.io/woodard/libabigail-f= edora . +``` +```bash +$ docker build -f docker/Dockerfile.ubuntu -t ghcr.io/woodard/libabigail-u= buntu-22.04 . +``` + +Note that currently the fedora image is deployed to `ghcr.io/woodard/libab= igail:latest`. + +### Shell + +To shell into a container (here is an example with ubuntu): + +```bash +$ docker run -it ghcr.io/woodard/libabigail-ubuntu-22.04 bash +``` + +Off the bat, you can find the abi executables: + +```bash +# 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. + +```bash +$ spack install +``` + +And that's it! This workflow should make it easy to install development ve= rsions 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 c= ode to +compile, and then run `make check`. You can do this as follows on your loc= al machine: + +```bash +$ docker build -f docker/Dockerfile.test -t test . +``` diff --git a/docker/Dockerfile.fedora b/docker/Dockerfile.fedora new file mode 100644 index 00000000..0257e99e --- /dev/null +++ b/docker/Dockerfile.fedora @@ -0,0 +1,38 @@ +FROM ghcr.io/woodard/libabigail-fedora-base as builder + +# docker build -f docker/Dockerfile.fedora -t ghcr.io/woodard/libabigail-f= edora . + +WORKDIR /code +COPY . /code + +RUN mkdir -p build && \ + autoreconf -i && \ + cd build && \ + CXXFLAGS=3D"-g3 -fvar-tracking-assignments \ + -gstatement-frontiers -gvariable-location-views -grecord-gcc-switches = -pipe -Wall \ + -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -Wp,-= D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong -fstack-clash-protection -fcf-protection \ + -fasynchronous-unwind-tables -O2" CFLAGS=3D"-g3 -fvar-tracking-assignm= ents \ + -gstatement-frontiers -gvariable-location-views -grecord-gcc-switches = -pipe -Wall \ + -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -Wp,-= D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong -fstack-clash-protection -fcf-protection \ + -fasynchronous-unwind-tables -O2" LDFLAGS=3D"-Wl,--no-undefined" \ + ../configure --prefix=3D/opt/libabigail --enable-rpm=3Dyes && \ + make -j4 && \ + make install + +FROM fedora:latest +COPY --from=3Dbuilder /opt/libabigail /opt/libabigail +ENV PATH=3D/opt/libabigail/bin:$PATH + +# Runtime dependencies +RUN dnf install -y \ + python3-koji \ + python3-mock \ + python3-pyxdg \ + elfutils-libelf \ + elfutils-libs \ + libstdc++ \ + lbzip2 \ + shared-mime-info \ + six diff --git a/docker/Dockerfile.fedora-base b/docker/Dockerfile.fedora-base new file mode 100644 index 00000000..f803dd7f --- /dev/null +++ b/docker/Dockerfile.fedora-base @@ -0,0 +1,21 @@ +ARG fedora_version=3Dlatest +# ARG fedora_version=3D35 +FROM fedora:${fedora_version} as builder + +# docker build -f docker/Dockerfile.fedora-base -t ghcr.io/woodard/libabig= ail-fedora-base . + +RUN dnf install -y \ + autoconf \ + automake \ + cpio \ + elfutils-devel \ + gcc-c++ \ + lbzip2 \ + libtool \ + libxml2-devel \ + python3-koji \ + python3-mock \ + python3-pyxdg \ + shared-mime-info \ + six \ + wget diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test new file mode 100644 index 00000000..f25739a6 --- /dev/null +++ b/docker/Dockerfile.test @@ -0,0 +1,28 @@ +FROM ghcr.io/woodard/libabigail-fedora-base + +# docker build -f docker/Dockerfile.test -t test . + +RUN dnf install -y \ + file \ + diffutils \ + lbzip2 \ + elfutils-libs + +WORKDIR /code +COPY . /code + +RUN mkdir -p build && \ + autoreconf -i && \ + cd build && \ + CXXFLAGS=3D"-g3 -fvar-tracking-assignments \ + -gstatement-frontiers -gvariable-location-views -grecord-gcc-switches = -pipe -Wall \ + -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -Wp,-= D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong -fstack-clash-protection -fcf-protection \ + -fasynchronous-unwind-tables -O2" CFLAGS=3D"-g3 -fvar-tracking-assignm= ents \ + -gstatement-frontiers -gvariable-location-views -grecord-gcc-switches = -pipe -Wall \ + -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -Wp,-= D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong -fstack-clash-protection -fcf-protection \ + -fasynchronous-unwind-tables -O2" LDFLAGS=3D"-Wl,--no-undefined" \ + ../configure --prefix=3D/opt/libabigail --enable-rpm=3Dyes && \ + make -j4 && \ + make check ENABLE_SLOW_TEST=3Dyes || (cat tests/test-suite.log && exit= 1) diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu new file mode 100644 index 00000000..cb1dc166 --- /dev/null +++ b/docker/Dockerfile.ubuntu @@ -0,0 +1,30 @@ +ARG ubuntu_version=3D22.04 +ARG gcc_version=3D10.3.0 +FROM ghcr.io/rse-ops/gcc-ubuntu-${ubuntu_version}:gcc-${gcc_version} + +# docker build -t ghcr.io/woodard/libabigail-ubuntu-22.04 . + +# Install Libabigail to its own view +WORKDIR /opt/abigail-env +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack env create -d . && \ + spack env activate . && \ + spack add libabigail@master && \ + spack --debug install + +# Prepare a source extraction of libabigail at /src (intended to be overwr= itten by user) +COPY . /src + +# Second run - should have deps cached +RUN . /opt/spack/share/spack/setup-env.sh && \ + + # This adds metadata for libabigail to spack.yaml + spack develop --path /src libabigail@master && \ + spack --debug install + # At this point you can spack install, and bind the code to /code to d= evelop + +# ensure libabigail stuffs always on the path +RUN cd /opt/abigail-env && \ + spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh + +ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l", "-c"] --=20 2.35.0.rc2 --=20 Dodji