Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libmtime
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
icon-libraries
libmtime
Commits
8ee39ae7
Commit
8ee39ae7
authored
9 months ago
by
Sergey Kosukhin
Browse files
Options
Downloads
Patches
Plain Diff
CI: implement universal check for compiler warnings
parent
1d4a8589
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!28
Build everything but the HL interface without warnings
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+21
-15
21 additions, 15 deletions
.gitlab-ci.yml
with
21 additions
and
15 deletions
.gitlab-ci.yml
+
21
−
15
View file @
8ee39ae7
...
...
@@ -65,7 +65,7 @@ check_style:
--fortran .f90
-
git -C ${CI_PROJECT_DIR} diff --patch-with-raw > ${STYLE_PATCH}
-
|
# Test if patching is necessary
:
# Test if patching is necessary
test ! -s ${STYLE_PATCH} || {
printf "${RED}The source code does not meet the style recuirements. \
Please, apply the patch (see artifacts).${DEFAULT}\n"
...
...
@@ -115,6 +115,8 @@ include:
LIBCHECK_SHA256
:
a8de4e0bacfb4d76dd1c618ded263523b53b85d92a146d8835eb1a52932fa20a
MAKEFLAGS
:
--jobs=8 V=1
AM_COLOR_TESTS
:
always
WARNINGS_AWK_SCRIPT
:
'
/warning/
||
/WARNING/
||
/Warning/'
WARNINGS_FILE
:
${CI_PROJECT_DIR}/make.warnings
before_script
:
-
module purge
-
module load gcc/11.2.0-gcc-11.2.0
...
...
@@ -138,29 +140,31 @@ include:
script
:
-
mkdir build && cd build
-
../configure --with-check-root="${LIBCHEK_ROOT}" ${CONFIG_EXTRA_ARGS}
-
make
-
make check
-
make --output-sync=target check AM_COLOR_TESTS=no TESTS= 2> >(tee ${WARNINGS_FILE})
-
make --silent --keep-going check
-
awk "${WARNINGS_AWK_SCRIPT}" ${WARNINGS_FILE} > awk.out
-
|
# Check if there are compiler warnings
test ! -s awk.out || {
printf "${RED}The compiler issued warnings (see artifacts).${DEFAULT}\n"
exit 1
}
interruptible
:
true
artifacts
:
when
:
on_failure
paths
:
-
${WARNINGS_FILE}
cache
:
policy
:
pull
key
:
${LIBCHECK_SHA256}
paths
:
-
${LIBCHEK_ROOT}
gcc11_pedantic
:
extends
:
.common
script
:
# The examples are too broken:
-
./configure --disable-examples ${CONFIG_EXTRA_ARGS}
# The configuration fails with all warnings enabled and -Werror. Therefore,
# we extend the flags at the build time:
-
>-
make
CFLAGS="$(echo '@CFLAGS@' | ./config.status --file=-) -Wall -Wextra -pedantic -Werror"
FCFLAGS="$(echo '@FCFLAGS@' | ./config.status -q --file=-) -Wall -Wextra -pedantic -Werror"
gcc11
:
extends
:
.common
variables
:
CFLAGS
:
-g -O2 -Wall -Wextra -pedantic
FCFLAGS
:
-g -O2 -Wall -Wextra -pedantic
cache
:
policy
:
pull-push
...
...
@@ -187,6 +191,8 @@ nag:
extends
:
.common
variables
:
FC
:
nagfor
# Ignore Questionable warnings:
WARNINGS_AWK_SCRIPT
:
'
!/^\[NAG
Fortran
Compiler
normal
termination/
&&
(/warning/
||
/WARNING/
||
/Warning/)'
before_script
:
-
!reference
[
.common
,
before_script
]
-
module load nag/7.1-gcc-11.2.0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment