Skip to content

Commit 7b65a20

Browse files
authored
Merge pull request #17 from arielswalker/fix-16-mcdc-container
Fix #16, Add MCDC Container
2 parents 4091097 + ce61b72 commit 7b65a20

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/registry.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@ jobs:
6363
username: ${{ github.actor }}
6464
password: ${{ secrets.GITHUB_TOKEN }}
6565
tags: latest
66+
67+
mcdc:
68+
69+
name: Build and Push mcdc
70+
runs-on: ubuntu-latest
71+
72+
steps:
73+
- name: Checkout code
74+
uses: actions/checkout@v2
75+
76+
- name: Build and Push
77+
uses: mr-smithers-excellent/docker-build-push@v5
78+
with:
79+
image: mcdc
80+
dockerfile: mcdc/Dockerfile
81+
registry: ghcr.io
82+
username: ${{ github.actor }}
83+
password: ${{ secrets.GITHUB_TOKEN }}
84+
tags: latest

mcdc/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM ubuntu:20.04
2+
ENV DEBIAN_FRONTEND=noninteractive
3+
4+
# Install dependencies
5+
RUN apt-get update && apt-get install -y \
6+
build-essential \
7+
libgmp-dev \
8+
libmpfr-dev \
9+
libmpc-dev \
10+
wget \
11+
tar \
12+
gcc \
13+
g++ \
14+
make \
15+
git \
16+
cmake \
17+
lcov \
18+
python3 \
19+
&& rm -rf /var/lib/apt/lists/*
20+
21+
# Configure dynamic linker to include /usr/local/lib (for GCC libraries)
22+
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/gcc.conf && ldconfig
23+
24+
# Download and build GCC
25+
RUN wget http://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz && \
26+
tar -xf gcc-14.1.0.tar.gz && \
27+
cd gcc-14.1.0 && \
28+
./contrib/download_prerequisites && \
29+
./configure --prefix=/usr/local/gcc-14.1.0 --enable-languages=c,c++ --disable-multilib && \
30+
make -j$(nproc) && \
31+
make install && \
32+
ln -sf /usr/local/gcc-14.1.0/bin/gcc /usr/bin/gcc && \
33+
ln -sf /usr/local/gcc-14.1.0/bin/g++ /usr/bin/g++ && \
34+
rm -rf /var/lib/apt/lists/* && \
35+
rm -rf /gcc-14.1.0
36+
37+
# Set the GCC binary path globally for the build process
38+
ENV PATH=/usr/local/gcc-14.1.0/bin:$PATH

0 commit comments

Comments
 (0)