Skip to content

Commit

Permalink
Merge pull request #17 from arielswalker/fix-16-mcdc-container
Browse files Browse the repository at this point in the history
Fix #16, Add MCDC Container
  • Loading branch information
dzbaker authored Jan 13, 2025
2 parents 4091097 + ce61b72 commit 7b65a20
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: latest

mcdc:

name: Build and Push mcdc
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build and Push
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: mcdc
dockerfile: mcdc/Dockerfile
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: latest
38 changes: 38 additions & 0 deletions mcdc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libgmp-dev \
libmpfr-dev \
libmpc-dev \
wget \
tar \
gcc \
g++ \
make \
git \
cmake \
lcov \
python3 \
&& rm -rf /var/lib/apt/lists/*

# Configure dynamic linker to include /usr/local/lib (for GCC libraries)
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/gcc.conf && ldconfig

# Download and build GCC
RUN wget http://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz && \
tar -xf gcc-14.1.0.tar.gz && \
cd gcc-14.1.0 && \
./contrib/download_prerequisites && \
./configure --prefix=/usr/local/gcc-14.1.0 --enable-languages=c,c++ --disable-multilib && \
make -j$(nproc) && \
make install && \
ln -sf /usr/local/gcc-14.1.0/bin/gcc /usr/bin/gcc && \
ln -sf /usr/local/gcc-14.1.0/bin/g++ /usr/bin/g++ && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /gcc-14.1.0

# Set the GCC binary path globally for the build process
ENV PATH=/usr/local/gcc-14.1.0/bin:$PATH

0 comments on commit 7b65a20

Please sign in to comment.