Skip to content
Snippets Groups Projects
Commit 8532c003 authored by Jö Fahlke's avatar Jö Fahlke
Browse files

[!51] Use one job explicitly for cloning the repos

Merge branch 'one-clone-job' into 'master'

This has the advantage that the cloned source cannot differ between native and
cuda builds. It has the disadvantage that the source must be uploaded to the
CI server and later downloaded again.

This also now reports the exact versions of the downloaded source.

Closes: [#11]

See merge request [joe/pacxx-docker!51]

  [#11]: gitlab.dune-project.org/joe/pacxx-docker/issues/11
  [joe/pacxx-docker!51]: gitlab.dune-project.org/joe/pacxx-docker/merge_requests/51


Closes #11
parents 93895718 9b124f24
No related branches found
No related tags found
1 merge request!51Use one job explicitly for cloning the repos
Pipeline #12224 passed with warnings
......@@ -6,6 +6,7 @@ variables:
stages:
- utils
- base
- pacxx-source
- pacxx-build
- mkimage
- test
......@@ -98,28 +99,55 @@ stop-base:
######################################################################
#
# PACXX Build: build pacxx using the base image
# PACXX Source: get the sources
#
pacxx-build-native:
stage: pacxx-build
# using the just-built image here because if we use e.g. alpine, the produced
# zip will record the uid and gid of root for all files, and the extraction
# process later will preserve that
pacxx-source:
stage: pacxx-source
image: $REGISTRY/$CI_PROJECT_PATH:base-native.$PIPELINE_TAG
dependencies: []
tags:
- hpc2seci
variables:
GIT_STRATEGY: none
script:
- mkdir src
- cd src
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-llvm2.git .
- ../bin/verbose-git-status . llvm-wrapper-repo 2>&1 | tee -a repoversions
- ./reinit
- ../bin/verbose-git-status . llvm 2>&1 | tee -a repoversions
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-clang.git tools/clang
- ../bin/verbose-git-status tools/clang clang 2>&1 | tee -a repoversions
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-rv2.git tools/rv
- ../bin/verbose-git-status tools/rv rv-wrapper-repo 2>&1 | tee -a repoversions
- (cd tools/rv && ./reinit)
- ../bin/verbose-git-status tools/rv rv 2>&1 | tee -a repoversions
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-runtime.git projects/pacxxrt
- mkdir ../build
- cd ../build
- ../bin/verbose-git-status projects/pacxxrt pacxx-runtime 2>&1 | tee -a repoversions
artifacts:
paths:
- src/
expire_in: 1 week
######################################################################
#
# PACXX Build: build pacxx using the base image
#
pacxx-build-native:
stage: pacxx-build
image: $REGISTRY/$CI_PROJECT_PATH:base-native.$PIPELINE_TAG
dependencies:
- pacxx-source
tags:
- hpc2seci
variables:
GIT_STRATEGY: none
script:
- mkdir build
- cd build
- cmake ../src -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_CXX1Y=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3" -DCMAKE_INSTALL_PREFIX=/opt/pacxx
- make -j$(nproc)
- cd ..
......@@ -132,22 +160,15 @@ pacxx-build-native:
pacxx-build-cuda:
stage: pacxx-build
image: $REGISTRY/$CI_PROJECT_PATH:base-cuda.$PIPELINE_TAG
dependencies: []
dependencies:
- pacxx-source
tags:
- hpc2seci
variables:
GIT_STRATEGY: none
script:
- mkdir src
- cd src
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-llvm2.git .
- ./reinit
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-clang.git tools/clang
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-rv2.git tools/rv
- (cd tools/rv && ./reinit)
- git clone --depth=1 https://zivgitlab.uni-muenster.de/HPC2SE-Project/pacxx-runtime.git projects/pacxxrt
- mkdir ../build
- cd ../build
- mkdir build
- cd build
- cmake ../src -DBUILD_SHARED_LIBS=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_CXX1Y=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE="-O3" -DCMAKE_INSTALL_PREFIX=/opt/pacxx
- make -j$(nproc)
- cd ..
......
#!/bin/sh
# verbose-git-status DIR NAME
dir=${1:?Need a directory to report status for}
name=${2:?Need a repository name to report}
echo "Status for $name in $dir:"
echo "Remotes:"
git -C "$dir" remote -v
echo "Top commit:"
git -C "$dir" log -n1
echo "Status:"
git -C "$dir" status
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment