Skip to content

Commit

Permalink
Merge #3326
Browse files Browse the repository at this point in the history
3326: Update maintainer and CI shell scripts r=KaiSzuttor a=jngrad

Fixes #3242

Description of changes:
- reduce number of shellcheck warnings from 238 down to 104
   - rules: `SC2002 SC2006 SC2061 SC2063 SC2086 SC2116 SC2148 SC2166 SC2196`
   - 50 of the remaining warnings are false positives from `build_cmake.sh` (`SC2086 SC2154`)
- refactor outdated maintainer shell scripts
- remove deprecated shell syntax and shell commands
- use POSIX alternatives to bashisms when the change is trivial
- quote string variables to guard against whitespace-related issues
- start unit tests before integration tests
- run unit tests for all operating systems (Debian, OpenSUSE, Fedora)

Notes:
- `shellcheck` is unsuitable for CI in its current form (e.g. no rule whitelisting capability)
- the shell scripts now have an homogeneous syntax and few linter warnings, which is desirable if we decide to port them to Python in the future

Co-authored-by: Jean-Noël Grad <jgrad@icp.uni-stuttgart.de>
  • Loading branch information
bors[bot] and jngrad authored Dec 5, 2019
2 parents 9a38be9 + 93ec8c6 commit d7dab86
Show file tree
Hide file tree
Showing 26 changed files with 401 additions and 383 deletions.
22 changes: 11 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ debian:10:
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/debian-python3:10
script:
- export with_cuda=false
- export myconfig=maxset make_check=false
- export myconfig=maxset make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -143,7 +143,7 @@ opensuse:15.1:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/$CI_JOB_NAME
script:
- export with_cuda=false myconfig=maxset make_check=false
- export with_cuda=false myconfig=maxset make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -154,7 +154,7 @@ centos:7:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/centos-python3:7
script:
- export with_cuda=false myconfig=maxset make_check=true
- export with_cuda=false myconfig=maxset make_check_python=true
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand All @@ -165,7 +165,7 @@ fedora:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/centos-python3:next
script:
- export with_cuda=false myconfig=maxset make_check=false
- export with_cuda=false myconfig=maxset make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand Down Expand Up @@ -217,7 +217,7 @@ tutorials-samples-maxset:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=maxset with_coverage=false make_check=false
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=true test_timeout=1200
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -230,7 +230,7 @@ tutorials-samples-default:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=default with_coverage=false make_check=false
- export myconfig=default with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=true test_timeout=1200
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -245,7 +245,7 @@ tutorials-samples-empty:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=empty with_coverage=false make_check=false
- export myconfig=empty with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=true test_timeout=1200 with_scafacos=false
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -260,7 +260,7 @@ tutorials-samples-no-gpu:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=maxset with_coverage=false make_check=false
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export make_check_tutorials=true make_check_samples=true make_check_benchmarks=true test_timeout=1200 hide_gpu=true
- bash maintainer/CI/build_cmake.sh
tags:
Expand All @@ -274,7 +274,7 @@ installation:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:cuda-10.1
script:
- export myconfig=maxset with_coverage=false make_check=false
- export myconfig=maxset with_coverage=false make_check_unit_tests=false make_check_python=false
- export srcdir=${CI_PROJECT_DIR} test_timeout=1800
- bash maintainer/CI/build_cmake.sh
- cd build
Expand Down Expand Up @@ -317,7 +317,7 @@ ubuntu:wo-dependencies:
stage: build
image: gitlab.icp.uni-stuttgart.de:4567/espressomd/docker/ubuntu-python3:wo-dependencies
script:
- export myconfig=maxset make_check=false
- export myconfig=maxset make_check_unit_tests=false make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- docker
Expand Down Expand Up @@ -388,7 +388,7 @@ osx-cuda:
<<: *global_job_definition
stage: build
script:
- export with_ccache=false myconfig=maxset with_cuda=true make_check=false
- export with_ccache=false myconfig=maxset with_cuda=true make_check_unit_tests=false make_check_python=false
- bash maintainer/CI/build_cmake.sh
tags:
- mac
Expand Down
18 changes: 9 additions & 9 deletions doc/doxygen/Doxyfile.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Doxyfile 1.8.2

@INCLUDE = @CMAKE_CURRENT_BINARY_DIR@/doxy-features
@INCLUDE = "@CMAKE_CURRENT_BINARY_DIR@/doxy-features"

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
Expand Down Expand Up @@ -47,14 +47,14 @@ PROJECT_BRIEF = "Extensible Simulation Package for Research on Soft Mat
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.

PROJECT_LOGO = @CMAKE_SOURCE_DIR@/doc/logo/logo_48x48.png
PROJECT_LOGO = "@CMAKE_SOURCE_DIR@/doc/logo/logo_48x48.png"

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.

OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@"

# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
Expand Down Expand Up @@ -647,8 +647,8 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = @CMAKE_SOURCE_DIR@/src \
@CMAKE_SOURCE_DIR@/doc/doxygen/main.dox
INPUT = "@CMAKE_SOURCE_DIR@/src" \
"@CMAKE_SOURCE_DIR@/doc/doxygen/main.dox"

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down Expand Up @@ -686,7 +686,7 @@ RECURSIVE = YES
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = @CMAKE_SOURCE_DIR@/src/config/myconfig-default.hpp
EXCLUDE = "@CMAKE_SOURCE_DIR@/src/config/myconfig-default.hpp"

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand All @@ -700,8 +700,8 @@ EXCLUDE_SYMLINKS = NO
# against the file with absolute path, so to exclude all test directories
# for example use the pattern */test/*

EXCLUDE_PATTERNS = @CMAKE_SOURCE_DIR@/*/unit_tests/* \
@CMAKE_SOURCE_DIR@/*/tests/*
EXCLUDE_PATTERNS = "@CMAKE_SOURCE_DIR@/*/unit_tests/*" \
"@CMAKE_SOURCE_DIR@/*/tests/*"

# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
Expand Down Expand Up @@ -735,7 +735,7 @@ EXAMPLE_RECURSIVE = YES
# directories that contain image that are included in the documentation (see
# the \image command).

IMAGE_PATH = @CMAKE_SOURCE_DIR@/doc/doxygen/figs
IMAGE_PATH = "@CMAKE_SOURCE_DIR@/doc/doxygen/figs"

# The INPUT_FILTER tag can be used to specify a program that doxygen should
# invoke to filter for each input file. Doxygen will invoke the filter program
Expand Down
17 changes: 17 additions & 0 deletions doc/sphinx/samples.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ESPResSo is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import os
import ast
import textwrap
Expand Down
Loading

0 comments on commit d7dab86

Please sign in to comment.