Unverified Commit b9c2565c authored by Wuttke, Joachim's avatar Wuttke, Joachim Committed by GitHub
Browse files

Merge pull request #1085 from scgmlz/release-1.18.0

Release 1.18.0
parents 76364ae5 c87f8969
---
Checks: '*,
-*-braces-around-statements,
-*-convert-member-functions-to-static,
-*-implicit-bool-conversion,
-*-magic-numbers,
-*-named-parameter,
-*-trailing-return*,
-clang-analyzer-alpha*,
-cert-err58-cpp,
-cert-err61-cpp,
-clang-analyzer-alpha.deadcode.UnreachableCode,
-clang-analyzer-security.insecureAPI.strcpy,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-fuchsia-default-arguments-calls,
-fuchsia-overloaded-operator,
-fuchsia-trailing-return,
-google-build-using-namespace,
-google-default-arguments,
-google-readability-todo,
-google-runtime-int,
-hicpp-vararg,
-misc-throw-by-value-catch-by-reference,
-performance-unnecessary-value-param,
-*-avoid-c-arrays,
-*-avoid-goto,
-*-container-size-empty,
-*-isolate-declaration,
-*-member-init,
-*-namespace-comment,
-*-narrowing-conversions,
-*-owning-memory,
-*-pro-bounds-array-to-pointer-decay,
-*-simplify-boolean-expr,
-*-special-member-function*,
-*-static-definition-in-anonymous-namespace,
-*-statically-constructed-objects,
-*-use-auto,
-*-use-emplace,
-bugprone-copy-constructor-init,
-bugprone-exception-escape,
-bugprone-misplaced-widening-cast,
-bugprone-narrowing-conversions,
-bugprone-unhandled-self-assignment,
-bugprone-unused-return-value,
-bugprone-use-after-move,
-bugprone-parent-virtual-call,
-cert-dcl21-cpp,
-cert-msc30-c,
-cert-msc50-cpp,
-cert-oop54-cpp,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-static-cast-downcast,
-fuchsia-default-arguments-declarations,
-google-explicit-constructor,
-google-readability-avoid-underscore-in-googletest-name,
-google-readability-casting,
-google-runtime-references,
-hicpp-move-const-arg,
-hicpp-multiway-paths-covered,
-hicpp-no-array-decay,
-hicpp-noexcept-move,
-hicpp-signed-bitwise,
-hicpp-uppercase-literal-suffix,
-hicpp-use-equals-default,
-hicpp-use-nullptr,
-misc-non-private-member-variables-in-classes,
-misc-uniqueptr-reset-release,
-modernize-loop-convert,
-modernize-loop-convert,
-modernize-make-shared,
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-raw-string-literal,
-modernize-return-braced-init-list,
-modernize-use-equals-default,
-modernize-use-nullptr,
-modernize-use-using,
-performance-for-range-copy,
-performance-inefficient-vector-operation,
-performance-move-const-arg,
-performance-noexcept-move-constructor,
-performance-unnecessary-value-param,
-performance-unnecessary-copy-initialization,
-readability-avoid-const-params-in-decls,
-readability-const-return-type,
-readability-delete-null-pointer,
-readability-else-after-return,
-readability-inconsistent-declaration-parameter-name,
-readability-non-const-parameter,
-readability-redundant-control-flow,
-readability-redundant-string-cstr,
-readability-uppercase-literal-suffix,
-clang-analyzer-core.NonNullParamChecker,
'
......@@ -21,13 +21,13 @@ name: Linux
on:
push:
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
pull_request:
branches: [ master, develop ]
paths-ignore:
- 'Doc/**'
paths-ignore:
- 'Doc/**'
jobs:
build:
......@@ -39,34 +39,34 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
submodules: true
- name: Set up Python3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: setup apt dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential\
gfortran cmake libgsl-dev libboost-all-dev libfftw3-dev libtiff5-dev \
qt5-default libqt5designercomponents5 qttools5-dev libqt5svg5-dev \
ccache
gfortran cmake ccache \
libgsl-dev libboost-all-dev libfftw3-dev libtiff5-dev libcerf-dev libeigen3-dev \
qt5-default libqt5designercomponents5 qttools5-dev libqt5svg5-dev
- name: Install Python packages
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install numpy matplotlib
python3 -m pip install --upgrade pip
python3 -m pip install wheel setuptools
python3 -m pip install numpy matplotlib
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files for BornAgain
uses: actions/cache@v1.1.0
with:
......@@ -74,7 +74,7 @@ jobs:
key: ba-linux-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ba-linux-ccache-
- name: Build BornAgain
env:
CCACHE_DIR: $GITHUB_WORKSPACE/.ccache
......@@ -94,17 +94,17 @@ jobs:
if: success()
with:
name: BornAgainTar
path: ./build/BornAgain-*.tar.gz
path: ./build/BornAgain-*.tar.gz
- name: Testing
run: |
cd $GITHUB_WORKSPACE/build
ccache -s
ctest -LE Fullcheck --output-on-failure
- name: Upload test logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: LastTest.log
path: ./build/Testing/Temporary/LastTest.log
path: ./build/Testing/Temporary/LastTest.log
......@@ -21,13 +21,13 @@ name: MacOS
on:
push:
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
pull_request:
branches: [ master, develop ]
paths-ignore:
- 'Doc/**'
paths-ignore:
- 'Doc/**'
jobs:
build:
......@@ -39,32 +39,29 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
submodules: true
- name: setup dependencies
run: |
brew install cmake fftw gsl boost qt5 libtiff ccache
echo "Qt5 is installed to"
echo $QTDIR
brew install cmake ccache fftw gsl boost qt5 libtiff eigen python numpy scipy
echo "Qt5 is installed to $QTDIR"
wget http://apps.jcns.fz-juelich.de/src/MacLibs/cerf-1.14-Darwin.zip
unzip cerf-1.14-Darwin.zip
mv cerf-1.14-Darwin/lib/* /usr/local/bin/
mv cerf-1.14-Darwin/include/* /usr/local/include/
- name: Install Python packages
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install numpy scipy matplotlib
pip3 install wheel setuptools matplotlib
- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files for BornAgain
uses: actions/cache@v1.1.0
with:
......@@ -72,7 +69,7 @@ jobs:
key: ba-macos-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ba-macos-ccache-
- name: Build BornAgain
env:
CCACHE_DIR: $GITHUB_WORKSPACE/.ccache
......@@ -94,21 +91,21 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache ../
make -j4
- name: Testing
shell: bash
run: |
cd $GITHUB_WORKSPACE/build
ccache -s
ctest -LE Fullcheck --output-on-failure
- name: Upload test logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: LastTest.log
path: ./build/Testing/Temporary/LastTest.log
- name: Build package
env:
QTDIR: /usr/local/opt/qt
......@@ -117,7 +114,7 @@ jobs:
cd $GITHUB_WORKSPACE/build
echo $QTDIR
cpack -V
- name: Upload package
uses: actions/upload-artifact@v2
if: success()
......
......@@ -25,13 +25,13 @@ env:
on:
push:
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
branches: [ master, develop]
paths-ignore:
- 'Doc/**'
pull_request:
branches: [ master, develop ]
paths-ignore:
- 'Doc/**'
paths-ignore:
- 'Doc/**'
jobs:
build:
......@@ -43,14 +43,14 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
submodules: true
- name: Set up Python3
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: setup dependencies
shell: powershell
run: |
......@@ -59,19 +59,32 @@ jobs:
cd ${{github.workspace}}
mkdir deps
Get-Date -Format G
wget http://apps.jcns.fz-juelich.de/src/WinLibs/bornagain_deps_20200604.zip -O ${{runner.temp}}\local_x64.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libboost1.73.win64.zip -O ${{runner.temp}}\libboost.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libcerf1.14.win64.zip -O ${{runner.temp}}\libcerf.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libfftw3.win64.zip -O ${{runner.temp}}\libfftw.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libgsl-static.win64.zip -O ${{runner.temp}}\libgsl.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libtiff.win64.zip -O ${{runner.temp}}\libtiff.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/libyaml.win64.zip -O ${{runner.temp}}\libyaml.zip
wget http://apps.jcns.fz-juelich.de/src/WinLibs/eigen3.3.7.zip -O ${{runner.temp}}\eigen.zip
Get-Date -Format G
7z x ${{runner.temp}}\local_x64.zip -odeps
7z x ${{runner.temp}}\libboost.zip -odeps
7z x ${{runner.temp}}\libcerf.zip -odeps
7z x ${{runner.temp}}\libfftw.zip -odeps
7z x ${{runner.temp}}\libgsl.zip -odeps
7z x ${{runner.temp}}\libtiff.zip -odeps
7z x ${{runner.temp}}\libyaml.zip -odeps
7z x ${{runner.temp}}\eigen.zip -odeps
Get-Date -Format G
dir deps
dir deps/local_x64
dir deps/include
dir deps/lib
- name: Install Python packages
run: |
python -m pip install --upgrade pip
python -m pip install wheel setuptools
python -m pip install numpy matplotlib
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
......@@ -82,25 +95,20 @@ jobs:
dir: '${{ github.workspace }}/qt5/'
install-deps: 'true'
modules: 'qtcharts qtwebengine'
mirror: 'http://mirrors.ocf.berkeley.edu/qt/'
cached: 'false'
- name: Download ccache and Ninja
- name: Download ccache, Ninja, Nsis
id: ccache
shell: cmake -P {0}
run: |
set(ccache_url "https://github.com/cristianadam/ccache/releases/download/v$ENV{CCACHE_VERSION}/${{ runner.os }}.tar.xz")
file(DOWNLOAD "${ccache_url}" ./ccache.tar.xz SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ccache.tar.xz)
set(ninja_url "https://github.com/ninja-build/ninja/releases/download/v$ENV{NINJA_VERSION}/ninja-win.zip")
file(DOWNLOAD "${ninja_url}" ./ninja.zip SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./ninja.zip)
- name: Download Nsis
id: nsis
shell: cmake -P {0}
run: |
set(nsis_url "https://sourceforge.net/projects/nsis/files/NSIS%203/3.04/nsis-3.04.zip")
file(DOWNLOAD "${nsis_url}" ./nsis.zip SHOW_PROGRESS)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ./nsis.zip)
......@@ -111,7 +119,7 @@ jobs:
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: ccache cache files for BornAgain
uses: actions/cache@v1.1.0
with:
......@@ -119,7 +127,7 @@ jobs:
key: ba-windows-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: |
ba-windows-ccache-
- name: Build BornAgain
shell: cmd
env:
......@@ -130,7 +138,8 @@ jobs:
CCACHE_MAXSIZE: "1000M"
run: |
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set OPTLIBS=${{github.workspace}}\deps\local_x64
set OPTLIBS=${{github.workspace}}\deps
set EIGENDIR=${{github.workspace}}\eigen\eigen-3.3.7
set QTDIR=${{github.workspace}}\qt5\Qt\5.14.2\msvc2017_64
set PATH=${{github.workspace}};%OPTLIBS%\lib;%QTDIR%\bin;%PATH%
cd ${{github.workspace}}
......@@ -141,13 +150,13 @@ jobs:
ccache -z
ccache -p
cmake --build . --config Release -j4
- name: Testing
shell: cmd
run: |
echo %QTDIR%
echo %OPTLIBS%
set OPTLIBS=${{github.workspace}}\deps\local_x64
set OPTLIBS=${{github.workspace}}\deps
set PATH=%OPTLIBS%\lib;%QTDIR%\bin;%PATH%
echo %PATH%
cd ${{github.workspace}}\build
......@@ -159,7 +168,7 @@ jobs:
if: failure()
with:
name: LastTest.log
path: ./build/Testing/Temporary/LastTest.log
path: ./build/Testing/Temporary/LastTest.log
- name: Build package
if: success()
......@@ -167,7 +176,14 @@ jobs:
run: |
cd ${{github.workspace}}\build
set PATH=${{github.workspace}}\nsis-3.04;%PATH%
cpack -c Release
cpack --debug -c Release
- name: Upload CPack log
uses: actions/upload-artifact@v2
if: failure()
with:
name: CPack.log
path: ./build/_CPack_Packages/win64/NSIS/NSISOutput.log
- name: Upload package
uses: actions/upload-artifact@v2
......
*~
*.tmp
*.user
*.aux
*.bbl
*.blg
*.brf
*.dvi
*.end
*.idx
*.ilg
*.ind
*.log
*.nlo
*.out
*.toc
*.trs
*.vtp
*.spl
*__pycache__
build/
debug/
[submodule "ThirdParty/Core/eigen3"]
path = ThirdParty/Core/eigen3
url = https://gitlab.com/libeigen/eigen.git
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Binning/Bin.cpp
//! @file Base/Axis/Bin.cpp
//! @brief Implements structs Bin1D, Bin1DCVector
//!
//! @homepage http://www.bornagainproject.org
......@@ -12,7 +12,7 @@
//
// ************************************************************************** //
#include "Bin.h"
#include "Base/Axis/Bin.h"
bool BinContains(const Bin1D& bin, double value)
{
......
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Binning/Bin.h
//! @file Base/Axis/Bin.h
//! @brief Defines structs Bin1D, Bin1DCVector
//!
//! @homepage http://www.bornagainproject.org
......@@ -12,12 +12,12 @@
//
// ************************************************************************** //
#ifndef BIN_H
#define BIN_H
#ifndef BORNAGAIN_CORE_AXIS_BIN_H
#define BORNAGAIN_CORE_AXIS_BIN_H
#include "Vectors3D.h"
#include "Base/Vector/Vectors3D.h"
struct BA_CORE_API_ Bin1D {
struct Bin1D {
Bin1D() : m_lower(0), m_upper(0) {}
Bin1D(double lower, double upper) : m_lower(lower), m_upper(upper) {}
double m_lower; //!< lower bound of the bin
......@@ -33,7 +33,7 @@ bool BinContains(const Bin1D& bin, double value);
//! An one-dimensional range of kvector_t's.
//! @ingroup tools_internal
struct BA_CORE_API_ Bin1DKVector {
struct Bin1DKVector {
Bin1DKVector() : m_q_lower(), m_q_upper() {}
Bin1DKVector(const kvector_t lower, const kvector_t upper) : m_q_lower(lower), m_q_upper(upper)
{
......@@ -49,7 +49,7 @@ struct BA_CORE_API_ Bin1DKVector {
//! An one-dimensional range of cvector_t's.
//! @ingroup tools_internal
class BA_CORE_API_ Bin1DCVector
class Bin1DCVector
{
public:
Bin1DCVector() : m_q_lower(), m_q_upper() {}
......@@ -61,4 +61,4 @@ public:
cvector_t m_q_upper; //!< upper bound of the bin
};
#endif // BIN_H
#endif // BORNAGAIN_CORE_AXIS_BIN_H
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Binning/ConstKBinAxis.cpp
//! @file Base/Axis/ConstKBinAxis.cpp
//! @brief Implement class ConstKBinAxis.
//!
//! @homepage http://www.bornagainproject.org
......@@ -12,9 +12,9 @@
//
// ************************************************************************** //
#include "ConstKBinAxis.h"
#include "Exceptions.h"
#include "Numeric.h"
#include "Base/Axis/ConstKBinAxis.h"
#include "Base/Types/Exceptions.h"
#include "Base/Utils/Algorithms.h"
#include <iomanip>
ConstKBinAxis::ConstKBinAxis(const std::string& name, size_t nbins)
......@@ -81,9 +81,9 @@ bool ConstKBinAxis::equals(const IAxis& other) const
if (const ConstKBinAxis* otherAxis = dynamic_cast<const ConstKBinAxis*>(&other)) {
if (size() != otherAxis->size())
return false;
if (!Numeric::AreAlmostEqual(m_start, otherAxis->m_start))
if (!algo::almostEqual(m_start, otherAxis->m_start))
return false;
if (!Numeric::AreAlmostEqual(m_end, otherAxis->m_end))
if (!algo::almostEqual(m_end, otherAxis->m_end))
return false;
return true;
}
......
......@@ -2,7 +2,7 @@
//
// BornAgain: simulate and fit scattering at grazing incidence
//
//! @file Core/Binning/ConstKBinAxis.h
//! @file Base/Axis/ConstKBinAxis.h
//! @brief Defines class ConstKBinAxis.
//!
//! @homepage http://www.bornagainproject.org
......@@ -12,15 +12,15 @@
//
// ************************************************************************** //
#ifndef CONSTKBINAXIS_H
#define CONSTKBINAXIS_H
#ifndef BORNAGAIN_CORE_AXIS_CONSTKBINAXIS_H
#define BORNAGAIN_CORE_AXIS_CONSTKBINAXIS_H
#include "VariableBinAxis.h"
#include "Base/Axis/VariableBinAxis.h"
//! Axis with fixed bin size in sin(angle) space.
//! @ingroup tools
class BA_CORE_API_ ConstKBinAxis : public VariableBinAxis
class ConstKBinAxis : public VariableBinAxis
{
public:
//! ConstKBinAxis constructor.
......@@ -45,4 +45,4 @@ protected: