Commit baf12f28 authored by Niklas Eiling's avatar Niklas Eiling
Browse files

CI: Cleanup of gitlab-ci.yml. Checkout cricket 1.0 in centos Dockerfile for reproducibility

parent 759d5650
......@@ -16,15 +16,35 @@ stages:
- generate
- deploy
docker:
docker:fedora:
stage: prepare
needs: []
script:
- cp -r ~/.ssh .
- docker build
--file Packaging/Docker/Dockerfile.dev-centos
--file Packaging/Docker/Dockerfile.dev
--tag ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}:latest .
# build dedicated jupyter image in the future
tags:
- shell
- linux
docker:centos:
stage: prepare
needs: []
script:
- cp -r ~/.ssh .
- docker build
--file Packaging/Docker/Dockerfile.dev-centos
--tag ${DOCKER_IMAGE_DEV}-centos:${DOCKER_TAG}
--tag ${DOCKER_IMAGE_DEV}-centos:latest .
tags:
- shell
- linux
docker:jupyter:
stage: prepare
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile.jupyter
--build-arg DOCKER_IMAGE=${DOCKER_IMAGE_DEV}
......@@ -35,8 +55,9 @@ docker:
- shell
- linux
.build:linux:
build:linux:
stage: build
needs: ["docker:fedora"]
script:
- mkdir -p build
- cd build
......@@ -55,24 +76,26 @@ docker:
build:linux-cuda:
stage: build
needs: ["docker:centos"]
script:
- mkdir -p build
- cd build
- cmake -DWITH_SPDLOG_SUBMODULE=ON ..
- make -j 32
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
# cache:
# paths:
# - build
# key: build-linux-cuda
image: ${DOCKER_IMAGE_DEV}-centos:${DOCKER_TAG}
cache:
paths:
- build
key: build-linux-cuda
artifacts:
paths:
- build
tags:
- docker
.build:windows:
build:windows:
stage: build
needs: []
script:
- New-Item -ItemType Directory -Force -Path build
- Set-Location -Path build
......@@ -126,8 +149,9 @@ build:linux-cuda:
# tags:
# - docker
.generate:docs:
generate:docs:
stage: generate
needs: ["build:linux"]
script:
- make -j$(nproc) -C build docs
- make -j$(nproc) -C build docs_cxx
......@@ -141,8 +165,9 @@ build:linux-cuda:
tags:
- docker
.generate:packages:
generate:packages:
stage: generate
needs: ["build:linux"]
script:
- make -j$(nproc) -C build package
only:
......@@ -159,6 +184,7 @@ build:linux-cuda:
build:docker:
stage: build
needs: []
script:
- docker build
--file Packaging/Docker/Dockerfile
......@@ -175,8 +201,9 @@ build:docker:
only:
- tags
.test:jupyter:
test:jupyter:
stage: test
needs: ["build:linux"]
variables:
PYTHONPATH: "build/Source/Python:Source/Python"
script:
......@@ -192,6 +219,7 @@ build:docker:
.remote-gpu:
stage: test
needs: ["build:linux-cuda"]
variables:
GPU_TARGET: 'gitlab-runner@ghost'
RDIR: '/tmp/gitlab-jobs/$CI_PROJECT_NAME/$CI_JOB_ID'
......@@ -225,7 +253,7 @@ build:docker:
after_script:
- ssh $GPU_TARGET rm -rf $RDIR
- ssh $GPU_TARGET pkill -fe -2 $RDIR/test_kernel
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
image: ${DOCKER_IMAGE_DEV}-centos:${DOCKER_TAG}
dependencies:
- build:linux-cuda
tags:
......@@ -233,6 +261,7 @@ build:docker:
test:cuda:
extends: .remote-gpu
allow_failure: true
variables:
# Name of the test binary
TEST_BINARY: 'WSCC_9bus_mult_decoupled'
......@@ -245,8 +274,9 @@ test:cuda:
# Stage deploy
##############################################################################
.pages:
pages:
stage: deploy
needs: ["generate:docs"]
script:
- cp -r build/docs/sphinx/html/. public/sphinx
- cp -r build/docs/doxygen/html/. public/doxygen
......@@ -261,7 +291,7 @@ test:cuda:
- shell
- linux
.deploy:docker:
deploy:docker:
stage: deploy
script:
- docker push ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
......@@ -276,7 +306,7 @@ test:cuda:
only:
- tags
.deploy:packages:
deploy:packages:
stage: deploy
script:
- rsync ${RSYNC_OPTS} build/*.rpm ${DEPLOY_USER}@${DEPLOY_HOST}:/var/www/packages/fedora/29/x86_64
......
......@@ -44,19 +44,6 @@ RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/fedo
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
# CUDARPC and dependencies
RUN dnf install -y make bash git gcc autoconf libtool automake
RUN dnf install -y ncurses-devel zlib-devel binutils-devel mesa-libGL-devel libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind rpcgen
ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}"
# copy gitlab-runner ssh credentials into build container
COPY --chown=root .ssh /root/.ssh
RUN git clone --recurse-submodules https://git.rwth-aachen.de/niklas.eiling/cricket.git && \
cd cricket && \
make -j 32 LOG=INFO
ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
# Install some debuginfos
RUN dnf -y debuginfo-install \
python3
......
......@@ -18,6 +18,29 @@ RUN dnf -y update && \
dnf config-manager --set-enabled PowerTools && \
dnf config-manager --set-enabled remi
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-repo-rhel8-10.2.89-1.x86_64.rpm && \
dnf --refresh -y install cuda-compiler-10-2 cuda-libraries-dev-10-2 && \
ln -s cuda-10.2 /usr/local/cuda
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
# CUDARPC and dependencies
RUN dnf install -y make bash git gcc autoconf libtool automake \
ncurses-devel zlib-devel binutils-devel mesa-libGL-devel \
libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind \
rpcgen texinfo bison flex
ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}"
# copy gitlab-runner ssh credentials into build container
RUN git clone -b 1.0 --depth 1 --recurse-submodules https://git.rwth-aachen.de/niklas.eiling/cricket.git && \
cd cricket && \
make -j 16 LOG=INFO
ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
# Toolchain
RUN dnf -y install \
git clang gdb ccache \
......@@ -38,34 +61,6 @@ RUN dnf --refresh -y install \
graphviz-devel \
gsl-devel
# CUDA dependencies
RUN dnf -y install https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-repo-rhel8-10.2.89-1.x86_64.rpm && \
dnf --refresh -y install cuda-compiler-10-2 cuda-libraries-dev-10-2 && \
ln -s cuda-10.2 /usr/local/cuda
ENV PATH="/usr/local/cuda/bin:${PATH}"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
# CUDARPC and dependencies
RUN dnf install -y make bash git gcc autoconf libtool automake
RUN dnf install -y ncurses-devel zlib-devel binutils-devel mesa-libGL-devel libvdpau-devel mesa-libEGL-devel openssl-devel rpcbind rpcgen patchelf
ENV LD_LIBRARY_PATH="/usr/local/lib:/usr/local/lib64:${LD_LIBRARY_PATH}"
# copy gitlab-runner ssh credentials into build container
COPY --chown=root .ssh /root/.ssh
RUN git clone --recurse-submodules https://git.rwth-aachen.de/niklas.eiling/cricket.git && \
cd cricket && \
make -j 16 LOG=INFO
ENV PATH="$PWD/cricket/bin:${PATH}"
ENV LD_LIBRARY_PATH="$PWD/cricket/bin:${LD_LIBRARY_PATH}"
# Install some debuginfos
RUN dnf -y debuginfo-install \
python3
# CIMpp and VILLAS are installed here
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
# VILLAS dependencies
RUN dnf -y install \
openssl-devel \
......@@ -84,6 +79,9 @@ RUN cd /tmp && \
cmake -DCMAKE_INSTALL_LIBDIR=/usr/local/lib64 -DUSE_CIM_VERSION=IEC61970_16v29a -DBUILD_SHARED_LIBS=ON -DBUILD_ARABICA_EXAMPLES=OFF .. && make -j$(nproc) install && \
rm -rf /tmp/libcimpp
# CIMpp and VILLAS are installed here
ENV LD_LIBRARY_PATH="/usr/local/lib64:${LD_LIBRARY_PATH}"
# Python dependencies
ADD requirements.txt .
RUN pip3 install -r requirements.txt
......@@ -96,4 +94,6 @@ RUN dnf -y --refresh install npm
RUN jupyter nbextension enable --py widgetsnbextension
RUN jupyter labextension install @jupyter-widgets/jupyterlab-manager
COPY --chown=root .ssh /root/.ssh
EXPOSE 8888
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment