Skip to content

Commit 382de86

Browse files
committed
add docker with gentoo using clang llvm to github CI
1 parent 26b7987 commit 382de86

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

.github/workflows/docker_linuxes.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,3 +246,13 @@ jobs:
246246
- name: Run unit tests (ctest) within the Docker image
247247
run: docker run ctl:latest sh -c "cd ./build && ctest"
248248

249+
gentoo-clang:
250+
runs-on: ubuntu-latest
251+
steps:
252+
- uses: actions/checkout@v4
253+
- name: Build the Docker image
254+
run: docker build --no-cache --rm -f ./docker/Dockerfile_gentoo_clang -t ctl:latest .
255+
256+
- name: Run unit tests (ctest) within the Docker image
257+
run: docker run ctl:latest sh -c "cd ./build && ctest"
258+

docker/Dockerfile_gentoo_clang

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
FROM gentoo/stage3
2+
3+
# update packages
4+
RUN emaint --auto sync
5+
6+
# install development tools
7+
RUN emerge cmake
8+
RUN emerge llvm-core/clang
9+
10+
# install CTL required dependencies
11+
RUN emerge openexr
12+
13+
# install CTL optional dependencies
14+
RUN emerge tiff
15+
16+
# switch to clang system wide
17+
# based on https://wiki.gentoo.org/wiki/LLVM/Clang
18+
# RUN printf "CC=clang\n" >> /etc/portage/make.conf
19+
# RUN printf "CPP=clang-cpp\n" >> /etc/portage/make.conf
20+
# RUN printf "CXX=clang++\n" >> /etc/portage/make.conf
21+
# RUN printf "AR=llvm-ar\n" >> /etc/portage/make.conf
22+
# RUN printf "NM=llvm-nm\n" >> /etc/portage/make.conf
23+
# RUN printf "RANLIB=llvm-ranlib\n" >> /etc/portage/make.conf
24+
25+
# switch to the make.profile symlink
26+
#RUN eselect profile set 39
27+
28+
# update path
29+
# RUN env-update && . /etc/profile
30+
#RUN source /etc/profile && env-update
31+
#RUN source /etc/profile
32+
ENV PATH=$PATH:/usr/lib/llvm/19/bin
33+
34+
# build CTL
35+
WORKDIR /usr/src/CTL
36+
COPY . .
37+
WORKDIR /usr/src/CTL/build
38+
RUN rm -R * || true
39+
RUN cmake .. -DCMAKE_CXX_COMPILER=clang++
40+
RUN make
41+
RUN make install
42+
43+
# finalize docker environment
44+
WORKDIR /usr/src/CTL

0 commit comments

Comments
 (0)