diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml index 5a0e5d8..1c548a2 100644 --- a/.github/workflows/build_docker_image.yml +++ b/.github/workflows/build_docker_image.yml @@ -25,4 +25,11 @@ jobs: with: push: ${{ github.ref == 'refs/heads/main' }} tags: ghcr.io/f3d-app/f3d-ci:latest - file: Dockerfile + file: ci/Dockerfile + + - name: Build and push superbuild + uses: docker/build-push-action@v3 + with: + push: ${{ github.ref == 'refs/heads/main' }} + tags: ghcr.io/f3d-app/f3d-superbuild-ci:latest + file: superbuild/Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 6189b69..0000000 --- a/Dockerfile +++ /dev/null @@ -1,56 +0,0 @@ -FROM ubuntu:18.04 - -# Install needed packages -RUN apt update && apt install -y \ - apt-transport-https \ - build-essential \ - cargo \ - ca-certificates \ - clang-10 \ - curl \ - chrpath \ - default-jdk \ - freeglut3 \ - freeglut3-dev \ - g++-8 \ - gcc-8 \ - gnupg \ - gzip \ - help2man \ - lcov \ - libgl1-mesa-dev \ - libglfw3-dev \ - libglu1-mesa \ - libjson-perl \ - libperlio-gzip-perl \ - libqt5opengl5-dev \ - libssl-dev \ - libx11-dev \ - libxcursor1 \ - libxt-dev \ - openssh-client \ - pkg-config \ - python3-dev \ - qtbase5-dev \ - software-properties-common \ - unzip \ - wget \ - xvfb - -# Install up-to-date needed packages -RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null -RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' -RUN add-apt-repository ppa:git-core/ppa -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash -RUN apt update && apt install -y cmake git git-lfs - -# Install sccache -RUN cargo install sccache -ENV PATH="${PATH}:/root/.cargo/bin" - -# Install a more recent lcov -RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/l/lcov/lcov_1.14-2_all.deb -RUN dpkg -i lcov_1.14-2_all.deb - -# Use gcc-8 by default -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 diff --git a/README.md b/README.md index 429a21d..ddf2206 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ -# F3D CI Docker setup +# F3D Docker images for CI -A Dockerfile and automatic workflow to generate a docker image -used by all F3D CI. +A collection of Dockerfile used by F3D differents continuous integrations. # License diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 0000000..c1b4d55 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:23.04 + +# Install generic build dependency +RUN apt update && apt install -y \ + build-essential \ + cmake \ + clang + +# Install VTK build dependency +RUN apt update && apt install -y \ + libgl1-mesa-dev \ + libglfw3-dev \ + libglu1-mesa \ + libssl-dev \ + libx11-dev \ + libxcursor-dev \ + libxt-dev + +# Install F3D build and test dependency +RUN apt update && apt install -y \ + default-jdk \ + help2man \ + libqt5opengl5-dev \ + python3-dev + +# Install CI tools +RUN apt update && apt install -y \ + git \ + git-lfs \ + lcov \ + xvfb diff --git a/superbuild/Dockerfile b/superbuild/Dockerfile new file mode 100644 index 0000000..a9c984e --- /dev/null +++ b/superbuild/Dockerfile @@ -0,0 +1,52 @@ +FROM ubuntu:18.04 + +# Install dockerfile dependency +RUN apt update && apt install -y \ + ca-certificates \ + cargo \ + libssl-dev \ + pkg-config \ + software-properties-common \ + wget + +# Install generic build dependency +RUN apt update && apt install -y \ + build-essential \ + g++-8 \ + gcc-8 + +# Install VTK build dependency +RUN apt update && apt install -y \ + libgl1-mesa-dev \ + libglfw3-dev \ + libglu1-mesa \ + libssl-dev \ + libx11-dev \ + libxcursor-dev \ + libxt-dev + +# Install F3D build dependency +RUN apt update && apt install -y help2man + +# Install superbuild dependencies +RUN apt update && apt install -y \ + chrpath \ + curl \ + gzip + +# Install CI tools +RUN apt update && apt install -y xvfb + +# Install up-to-date needed packages +RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null +RUN apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main' +RUN add-apt-repository ppa:git-core/ppa +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash +RUN apt update && apt install -y cmake git git-lfs + +# Install sccache +RUN cargo install sccache +ENV PATH="${PATH}:/root/.cargo/bin" + +# Use gcc-8 by default +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8