Skip to content

Commit 7ad9797

Browse files
Issues/0180 llvm gentoo error (#181)
* add docker that uses Ubuntu clang to github workflow * add docker with Gentoo to github workflow * add docker with gentoo using clang llvm to github CI * addresses #180
1 parent 71f6c80 commit 7ad9797

File tree

5 files changed

+132
-1
lines changed

5 files changed

+132
-1
lines changed

.github/workflows/docker_linuxes.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ jobs:
112112
- name: Run unit tests (ctest) within the Docker image
113113
run: docker run ctl:latest sh -c "cd ./build && ctest"
114114

115+
ubuntu-latest-clang:
116+
117+
runs-on: ubuntu-latest
118+
119+
steps:
120+
- uses: actions/checkout@v4
121+
- name: Build the Docker image
122+
run: docker build --no-cache --rm -f ./docker/Dockerfile_ubuntu_latest_clang -t ctl:latest .
123+
124+
- name: Run unit tests (ctest) within the Docker image
125+
run: docker run ctl:latest sh -c "cd ./build && ctest"
126+
115127
redhat-ubi8:
116128

117129
runs-on: ubuntu-latest
@@ -223,4 +235,24 @@ jobs:
223235

224236
- name: Run the docker that runs valgrind
225237
run: docker run ctl:latest
226-
238+
239+
gentoo:
240+
runs-on: ubuntu-latest
241+
steps:
242+
- uses: actions/checkout@v4
243+
- name: Build the Docker image
244+
run: docker build --no-cache --rm -f ./docker/Dockerfile_gentoo -t ctl:latest .
245+
246+
- name: Run unit tests (ctest) within the Docker image
247+
run: docker run ctl:latest sh -c "cd ./build && ctest"
248+
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+

.github/workflows/ubuntu_arm_release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727

2828
steps:
2929

30+
- name: run apt-get update
31+
run: sudo apt-get -y update
32+
3033
- name: install libtiff
3134
run: sudo apt-get -y install libtiff-dev
3235

docker/Dockerfile_gentoo

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM gentoo/stage3
2+
3+
# update packages
4+
RUN emaint --auto sync
5+
6+
# install development tools
7+
RUN emerge cmake
8+
9+
# install CTL required dependencies
10+
RUN emerge openexr
11+
12+
# install CTL optional dependencies
13+
RUN emerge tiff
14+
15+
# build CTL
16+
WORKDIR /usr/src/CTL
17+
COPY . .
18+
WORKDIR /usr/src/CTL/build
19+
RUN rm -R * || true
20+
RUN cmake ..
21+
RUN make
22+
RUN make install
23+
24+
# finalize docker environment
25+
WORKDIR /usr/src/CTL

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
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt-get update
4+
5+
# disable interactive install
6+
ENV DEBIAN_FRONTEND noninteractive
7+
8+
# install developement tools
9+
RUN apt-get -y install cmake
10+
RUN apt-get -y install clang
11+
12+
# install CTL dependencies
13+
RUN apt-get -y install libopenexr-dev
14+
RUN apt-get -y install libtiff-dev
15+
16+
# build CTL
17+
WORKDIR /usr/src/CTL
18+
COPY . .
19+
WORKDIR /usr/src/CTL/build
20+
RUN rm -R * || true
21+
RUN cmake ..
22+
RUN make
23+
RUN make install
24+
25+
# finalize docker environment
26+
WORKDIR /usr/src/CTL
27+

0 commit comments

Comments
 (0)