Skip to content

Commit a299072

Browse files
feat(ci): move Linux CI to UBI 10 container images
Replace ubuntu-latest + setup-cpp with UBI 10 container images for all Linux CI jobs, eliminating devcontainer/CI drift and enabling IWYU and Bloaty in CI. Intel coverage now works via llvm-cov from oneAPI. - Add Containerfile.intel extending main image with Intel oneAPI - Add build-ci-image.yml to build/push images to GHCR - Split ci.yml into Linux (container), macOS, and Windows jobs - Update CodeQL workflow to use container - Add gcovr, lizard, bloaty to main Containerfile Resolves #6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 972fee1 commit a299072

6 files changed

Lines changed: 473 additions & 175 deletions

File tree

.devcontainer/Containerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,23 @@ RUN dnf install -y \
2323
# Static analysis and documentation
2424
RUN dnf install -y cppcheck doxygen graphviz
2525

26+
# Bloaty McBloatface — binary size analyzer (build from source)
27+
ARG BLOATY_VERSION="v1.1"
28+
RUN dnf install -y re2-devel protobuf-devel capstone-devel && \
29+
git clone --branch ${BLOATY_VERSION} --depth 1 \
30+
https://github.com/google/bloaty.git /tmp/bloaty && \
31+
cmake -S /tmp/bloaty -B /tmp/bloaty/build \
32+
-DCMAKE_BUILD_TYPE=Release -G Ninja && \
33+
cmake --build /tmp/bloaty/build -j && \
34+
cmake --install /tmp/bloaty/build && \
35+
rm -rf /tmp/bloaty
36+
2637
# Editors
2738
RUN dnf install -y neovim nano
2839

2940
# Python packages
3041
RUN python3 -m pip install --upgrade pip setuptools && \
31-
python3 -m pip install conan && \
42+
python3 -m pip install conan gcovr lizard && \
3243
conan --version
3344

3445
# Conan configuration for containers

.devcontainer/Containerfile.intel

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Intel oneAPI CI image — extends the main CI image with ICX/ICPX
2+
ARG BASE_IMAGE=ghcr.io/versatushpc/cmake_template/ci:latest
3+
FROM ${BASE_IMAGE}
4+
5+
# Intel oneAPI repository
6+
RUN rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && \
7+
cat > /etc/yum.repos.d/oneAPI.repo << 'EOF'
8+
[oneAPI]
9+
name=Intel oneAPI repository
10+
baseurl=https://yum.repos.intel.com/oneapi
11+
enabled=1
12+
gpgcheck=1
13+
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
14+
EOF
15+
16+
# Install Intel oneAPI DPC++/C++ compiler
17+
RUN dnf install -y intel-oneapi-compiler-dpcpp-cpp && \
18+
dnf clean all && rm -rf /var/cache/dnf
19+
20+
# Make Intel compiler available without setvars.sh
21+
# The compiler binaries and libraries are under /opt/intel/oneapi/compiler/latest
22+
ENV PATH="/opt/intel/oneapi/compiler/latest/bin:${PATH}" \
23+
LD_LIBRARY_PATH="/opt/intel/oneapi/compiler/latest/lib:${LD_LIBRARY_PATH}" \
24+
CMAKE_PREFIX_PATH="/opt/intel/oneapi/compiler/latest:${CMAKE_PREFIX_PATH}" \
25+
CC="icx" \
26+
CXX="icpx"
27+
28+
CMD ["/bin/bash"]
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: build-ci-image
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
paths:
7+
- '.devcontainer/Containerfile'
8+
- '.devcontainer/Containerfile.intel'
9+
- '.github/workflows/build-ci-image.yml'
10+
schedule:
11+
# Weekly rebuild — picks up UBI 10 base image security updates
12+
- cron: '0 6 * * 1'
13+
workflow_dispatch:
14+
15+
env:
16+
REGISTRY: ghcr.io
17+
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
jobs:
23+
build-ci-image:
24+
name: CI image
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
29+
- name: Log in to GHCR
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Image metadata
37+
id: meta
38+
uses: docker/metadata-action@v5
39+
with:
40+
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci
41+
tags: |
42+
type=raw,value=latest
43+
type=sha,prefix=sha-,format=short
44+
45+
- name: Build and push CI image
46+
uses: docker/build-push-action@v6
47+
with:
48+
context: .devcontainer
49+
file: .devcontainer/Containerfile
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
54+
build-ci-intel-image:
55+
name: CI Intel image
56+
runs-on: ubuntu-latest
57+
needs: build-ci-image
58+
steps:
59+
- uses: actions/checkout@v6
60+
61+
- name: Log in to GHCR
62+
uses: docker/login-action@v3
63+
with:
64+
registry: ${{ env.REGISTRY }}
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Image metadata
69+
id: meta
70+
uses: docker/metadata-action@v5
71+
with:
72+
images: ${{ env.REGISTRY }}/${{ github.repository }}/ci-intel
73+
tags: |
74+
type=raw,value=latest
75+
type=sha,prefix=sha-,format=short
76+
77+
- name: Build and push Intel CI image
78+
uses: docker/build-push-action@v6
79+
with:
80+
context: .devcontainer
81+
file: .devcontainer/Containerfile.intel
82+
push: true
83+
tags: ${{ steps.meta.outputs.tags }}
84+
labels: ${{ steps.meta.outputs.labels }}
85+
build-args: |
86+
BASE_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/ci:latest

0 commit comments

Comments
 (0)