mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
Merge CI/CD build files
This commit is contained in:
parent
f46d29fbfc
commit
319bcefa39
3 changed files with 64 additions and 73 deletions
|
|
@ -2,20 +2,12 @@ include:
|
|||
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
|
||||
|
||||
stages:
|
||||
- build_deps
|
||||
- build_cp2k
|
||||
- test_cp2k
|
||||
|
||||
variables:
|
||||
PERSIST_IMAGE_NAME: $CSCS_REGISTRY_PATH/cp2k:$CI_COMMIT_SHORT_SHA
|
||||
|
||||
build_deps_job:
|
||||
extends: .container-builder-cscs-zen2
|
||||
stage: build_deps
|
||||
timeout: 2 hours
|
||||
variables:
|
||||
DOCKERFILE: ci/docker/build_deps_psmp.Dockerfile
|
||||
|
||||
build_cp2k_job:
|
||||
extends: .container-builder-cscs-zen2
|
||||
stage: build_cp2k
|
||||
|
|
|
|||
|
|
@ -1,3 +1,66 @@
|
|||
# Stage 1a: Build CP2K toolchain
|
||||
FROM ubuntu:24.04 AS build
|
||||
|
||||
# Install packages required for the CP2K toolchain build
|
||||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
g++ \
|
||||
gcc \
|
||||
gfortran \
|
||||
git \
|
||||
libtool \
|
||||
libtool-bin \
|
||||
make \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3 \
|
||||
unzip \
|
||||
wget \
|
||||
zlib1g-dev
|
||||
|
||||
# Build CP2K toolchain
|
||||
COPY ./tools/toolchain /opt/cp2k/tools/toolchain
|
||||
WORKDIR /opt/cp2k/tools/toolchain
|
||||
RUN ./install_cp2k_toolchain.sh -j \
|
||||
--dry-run \
|
||||
--install-all \
|
||||
--no-arch-files \
|
||||
--target-cpu=native \
|
||||
--with-gcc=system \
|
||||
--with-mpich
|
||||
|
||||
# Perform toolchain build step-wise in stages after its initialization with dry-run
|
||||
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/
|
||||
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/
|
||||
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/
|
||||
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/
|
||||
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/
|
||||
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/
|
||||
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/
|
||||
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/
|
||||
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/
|
||||
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage9/ ./scripts/stage9/
|
||||
RUN ./scripts/stage9/install_stage9.sh && rm -rf ./build
|
||||
|
||||
# Stage 1b: Build CP2K with CMake
|
||||
WORKDIR /opt/cp2k
|
||||
COPY ./CMakeLists.txt .
|
||||
|
|
@ -91,7 +154,7 @@ source /opt/cp2k/tools/toolchain/install/setup\n\
|
|||
>/opt/cp2k/bin/entrypoint.sh && chmod 755 /opt/cp2k/bin/entrypoint.sh
|
||||
|
||||
# Create shortcut for regression test
|
||||
RUN printf "/opt/cp2k/tests/do_regtest.py --maxtasks 12 --workbasedir /mnt \$* /opt/cp2k/bin psmp" \
|
||||
RUN printf "/opt/cp2k/tests/do_regtest.py --workbasedir /mnt \$* /opt/cp2k/bin psmp" \
|
||||
>/opt/cp2k/bin/run_tests && chmod 755 /opt/cp2k/bin/run_tests
|
||||
|
||||
# Define entrypoint
|
||||
|
|
|
|||
|
|
@ -1,64 +0,0 @@
|
|||
# Stage 1a: Build CP2K toolchain
|
||||
FROM ubuntu:24.04 AS build
|
||||
|
||||
# Install packages required for the CP2K toolchain build
|
||||
RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
|
||||
bzip2 \
|
||||
ca-certificates \
|
||||
g++ \
|
||||
gcc \
|
||||
gfortran \
|
||||
git \
|
||||
libtool \
|
||||
libtool-bin \
|
||||
make \
|
||||
patch \
|
||||
pkg-config \
|
||||
python3 \
|
||||
unzip \
|
||||
wget \
|
||||
zlib1g-dev
|
||||
|
||||
# Build CP2K toolchain
|
||||
COPY ./tools/toolchain /opt/cp2k/tools/toolchain
|
||||
WORKDIR /opt/cp2k/tools/toolchain
|
||||
RUN ./install_cp2k_toolchain.sh -j \
|
||||
--dry-run \
|
||||
--install-all \
|
||||
--no-arch-files \
|
||||
--target-cpu=native \
|
||||
--with-gcc=system \
|
||||
--with-mpich
|
||||
|
||||
# Perform toolchain build step-wise in stages after its initialization with dry-run
|
||||
COPY ./tools/toolchain/scripts/stage0/ ./scripts/stage0/
|
||||
RUN ./scripts/stage0/install_stage0.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage1/ ./scripts/stage1/
|
||||
RUN ./scripts/stage1/install_stage1.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage2/ ./scripts/stage2/
|
||||
RUN ./scripts/stage2/install_stage2.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage3/ ./scripts/stage3/
|
||||
RUN ./scripts/stage3/install_stage3.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage4/ ./scripts/stage4/
|
||||
RUN ./scripts/stage4/install_stage4.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage5/ ./scripts/stage5/
|
||||
RUN ./scripts/stage5/install_stage5.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage6/ ./scripts/stage6/
|
||||
RUN ./scripts/stage6/install_stage6.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage7/ ./scripts/stage7/
|
||||
RUN ./scripts/stage7/install_stage7.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage8/ ./scripts/stage8/
|
||||
RUN ./scripts/stage8/install_stage8.sh && rm -rf ./build
|
||||
|
||||
COPY ./tools/toolchain/scripts/stage9/ ./scripts/stage9/
|
||||
RUN ./scripts/stage9/install_stage9.sh && rm -rf ./build
|
||||
|
||||
# EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue