Skip to content

Commit

Permalink
ci: change to clang17-release
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kraemer <[email protected]>
  • Loading branch information
VJanKraemer committed Jun 26, 2024
1 parent 5bed903 commit 3b0affa
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci-sil-kit-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
utils=./utils/
build-args: |
UBUNTU_VERSION=18.04
GCC_VERSION=8
file: ./containers/ci-ubuntu/Dockerfile
push: false
load: true
Expand All @@ -30,7 +29,7 @@ jobs:
run: |
docker run -itd --name emmy_noether sil-kit-test:latest /bin/bash
docker cp ./utils/image_tests.sh emmy_noether:/home/image_tests.sh
docker exec -w /home/ emmy_noether sh image_tests.sh 8
docker exec -w /home/ emmy_noether sh image_tests.sh
ubuntu-2004:
name: Build and test SIL Kit using the Ubuntu 20.04 image
Expand All @@ -47,7 +46,6 @@ jobs:
utils=./utils/
build-args: |
UBUNTU_VERSION=20.04
GCC_VERSION=9
file: ./containers/ci-ubuntu/Dockerfile
push: false
load: true
Expand All @@ -57,5 +55,5 @@ jobs:
run: |
docker run -itd --name emmy_noether sil-kit-test:latest /bin/bash
docker cp ./utils/image_tests.sh emmy_noether:/home/image_tests.sh
docker exec -w /home/ emmy_noether sh image_tests.sh 9
docker exec -w /home/ emmy_noether sh image_tests.sh
21 changes: 14 additions & 7 deletions containers/ci-ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ ENV DEBIAN_FRONTEND "noninteractive"
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

ARG GCC_VERSION="8"


# Install dependencies
RUN \
apt-get update \
&& \
Expand All @@ -22,23 +24,28 @@ RUN \
git \
build-essential \
sudo \
gcc-${GCC_VERSION} \
g++-${GCC_VERSION} \
lsb-base \
lsb-release \
ninja-build \
doxygen \
clang \
llvm \
python3-pip \
&& \
apt-get clean

COPY --from=utils fetch_cmake.sh /tmp/fetch_cmake.sh
COPY --from=utils docs_requirements.txt /tmp

ADD https://apt.llvm.org/llvm.sh /tmp


RUN chmod +x /tmp/fetch_cmake.sh
RUN /tmp/fetch_cmake.sh
ENV PATH /opt/vector/bin:$PATH
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r /tmp/docs_requirements.txt
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r /tmp/docs_requirements.txt

RUN chmod +x /tmp/llvm.sh
RUN /tmp/llvm.sh 17

RUN alias "clang=clang-17"
RUN alias "clang++=clang++-17"
9 changes: 7 additions & 2 deletions utils/image_tests.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#! /usr/bin/env sh

CMAKE_PRESET="gcc${1}-relwithdebinfo"
set -e
CMAKE_PRESET="clang-relwithdebinfo"

echo "Building ${CMAKE_PRESET}"

CLANG_LOCATION=$(which clang-17)
CLANGPLUS_LOCATION=$(which clang-17)
echo "Using: \n${CLANG_LOCATION} \n${CLANGPLUS_LOCATION}"

git -c http.sslverify=false clone --recursive --shallow-submodules --depth=1 https://github.com/vectorgrp/sil-kit.git

cd sil-kit

cmake --preset $CMAKE_PRESET
cmake -DCMAKE_C_COMPILER=${CLANG_LOCATION} -DCMAKE_CXX_COMPILER=${CLANGPLUS_LOCATION} --preset $CMAKE_PRESET
cmake --build --preset $CMAKE_PRESET
ctest --preset $CMAKE_PRESET

0 comments on commit 3b0affa

Please sign in to comment.