-
Notifications
You must be signed in to change notification settings - Fork 320
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
99 lines (93 loc) · 3.93 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
99 lines (93 loc) · 3.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
build:cmake-gnu:
tags: [gitlab-org-docker]
image: ubuntu:20.04
variables:
DEBIAN_FRONTEND: "noninteractive"
script:
- apt-get -qq update
- apt-get -qq install apt-transport-https ca-certificates gnupg software-properties-common wget
- 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
- apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
- apt-get install -qq build-essential git gfortran cmake libopenblas-dev libfftw3-dev libopenmpi-dev
- cmake --version
- mkdir build
- cd build
- cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_Fortran_COMPILER=mpif90 -DCMAKE_C_COMPILER=mpicc
-DMPIEXEC_PREFLAGS="--allow-run-as-root;--oversubscribe" .. && make -j 2
&& make pw ph hp pwcond neb pp pwall cp tddfpt gwl ld1 upf xspectra couple epw all_currents
&& ctest -j 2 -L unit --output-on-failure
- make install DESTDIR=`pwd`/install_root
build:pgi:
tags: [gitlab-org-docker]
image: nvcr.io/nvidia/nvhpc:21.2-devel-cuda11.2-ubuntu20.04
script:
- apt-get -qq update
- apt-get -qq install ca-certificates git m4
- ./configure FC=pgf90 F90=pgf90 F77=pgfortran MPIF90=mpif90 --enable-openmp --with-cuda=yes --enable-cuda-env-check=no --with-cuda-runtime=11.2 --with-cuda-cc=70
- make -j 2 pw cp ph
# Validate every INPUT_*.def with `helpdoc -strict` when a .def file or the
# helpdoc tooling changes.
docs:helpdoc-strict:
tags: [gitlab-org-docker]
image: ubuntu:24.04
variables:
DEBIAN_FRONTEND: "noninteractive"
rules:
# on-demand: manual pipeline trigger with GENERATE_DOCS=true
- if: '$GENERATE_DOCS == "true"'
# on-demand: commit message starts with [doc] or docs:
- if: '$CI_COMMIT_MESSAGE =~ /^(\[doc\]|docs:)/'
# automatic: MR touches a .def file or helpdoc tooling
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- "**/INPUT_*.def"
- dev-tools/helpdoc
- dev-tools/helpdoc.d/**/*
- dev-tools/helpdoc.schema
- dev-tools/input_xx.xsl
# automatic: same on master/develop
- if: '$CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"'
changes:
- "**/INPUT_*.def"
- dev-tools/helpdoc
- dev-tools/helpdoc.d/**/*
- dev-tools/helpdoc.schema
- dev-tools/input_xx.xsl
script:
- apt-get -qq update
- apt-get -qq install -y tcl tcllib xsltproc
- |
VERSION=$(awk -F\' '/version_number/{print $2}' include/qe_version.h)
echo "Using helpdoc version string: $VERSION"
fail=0
for def in $(find . -path ./external -prune -o -name 'INPUT_*.def' -print | grep -v '/external/'); do
d=$(dirname "$def"); b=$(basename "$def")
cp -f dev-tools/input_xx.xsl "$d/" 2>/dev/null || true
out=$(cd "$d" && ../../dev-tools/helpdoc -version "$VERSION" -strict "$b" 2>&1) || true
if printf '%s\n' "$out" | grep -q 'passed strict validation'; then
echo " ok $def"
else
fail=1
echo "======================================================================"
echo " FAIL $def"
printf '%s\n' "$out" | grep -E '^[[:space:]]+\* |VALIDATION FAILED|ABORT' \
|| printf '%s\n' "$out" | tail -25
fi
done
if [ "$fail" -ne 0 ]; then
echo ""
echo "######################################################################"
echo "## helpdoc --strict validation FAILED for one or more INPUT_*.def ##"
echo "## see the per-file violations listed above ##"
echo "######################################################################"
exit 1
fi
echo ""
echo "All INPUT_*.def files passed helpdoc --strict."
artifacts:
name: "helpdoc-html-$CI_COMMIT_REF_SLUG"
when: always
expire_in: 1 week
paths:
- "**/INPUT_*.html"
- "**/INPUT_*.xml"