Skip to content

Commit

Permalink
Merge branch 'lballabio:master' into 982_constraint2
Browse files Browse the repository at this point in the history
  • Loading branch information
CayOest authored Aug 1, 2023
2 parents ffbc855 + 520d62f commit 02f5e04
Show file tree
Hide file tree
Showing 529 changed files with 10,628 additions and 7,313 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ configuration: Release
version: ci.{build}

build:
parallel: true
parallel: false
project: QuantLib.sln
verbosity: normal

Expand Down
9 changes: 8 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ Checks: >
-bugprone-assignment-in-if-condition,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
-bugprone-empty-catch,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-bugprone-multiple-new-in-one-expression,
-bugprone-narrowing-conversions,
-bugprone-non-zero-enum-to-bool-conversion,
-bugprone-suspicious-include,
clang-analyzer-*,
-clang-analyzer-core.UndefinedBinaryOperatorResult,
Expand All @@ -34,10 +37,10 @@ Checks: >
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
misc-*,
-misc-confusable-identifiers,
-misc-const-correctness,
-misc-include-cleaner,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
Expand All @@ -51,6 +54,8 @@ Checks: >
-modernize-use-trailing-return-type,
-modernize-use-using,
performance-*,
-performance-avoid-endl,
-performance-enum-size,
readability-*,
-readability-braces-around-statements,
-readability-const-return-type,
Expand All @@ -70,6 +75,8 @@ Checks: >
HeaderFilterRegex: '.*'
FormatStyle: file
CheckOptions:
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: 1
- key: modernize-use-default-member-init.UseAssignment
value: 1
...
53 changes: 28 additions & 25 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ jobs:
run: |
mkdir build
cd build
cmake .. -GNinja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
cmake --build .
cmake .. -GNinja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -L
cmake --build . --verbose
sudo cmake --install .
sudo ldconfig
- name: Test
run: |
cd build
./test-suite/quantlib-test-suite --log_level=message
quantlib-test-suite --log_level=message
cmake-linux-with-options:
runs-on: ubuntu-latest
steps:
Expand All @@ -45,12 +46,13 @@ jobs:
cmake-linux-ci-opts-
- name: Compile
run: |
cmake --preset linux-ci-build-with-nonstandard-options
cmake --build --preset linux-ci-build-with-nonstandard-options
cmake --preset linux-ci-build-with-nonstandard-options -L
cd build/linux-ci-build-with-nonstandard-options
cmake --build . --verbose
sudo cmake --build . --target install
- name: Test
run: |
cd build
./test-suite/quantlib-test-suite --log_level=message
quantlib-test-suite --log_level=message
cmake-win:
runs-on: windows-2022
steps:
Expand All @@ -66,7 +68,7 @@ jobs:
variant: sccache
- name: Setup
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/binaries/boost_1_82_0-msvc-14.3-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
choco install -y ninja
Expand All @@ -78,13 +80,13 @@ jobs:
mkdir build
cd build
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L
cmake --build . --verbose
cmake --install .
dir ql\*.lib
- name: Test
run: |
cd build
.\test-suite\quantlib-test-suite --log_level=message
& "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
cmake-win-dynamic-runtime:
runs-on: windows-2022
steps:
Expand All @@ -100,7 +102,7 @@ jobs:
variant: sccache
- name: Setup
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/binaries/boost_1_82_0-msvc-14.3-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
choco install -y ninja
Expand All @@ -112,13 +114,13 @@ jobs:
mkdir build
cd build
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L
cmake --build . --verbose
cmake --install .
dir ql\*.lib
- name: Test
run: |
cd build
.\test-suite\quantlib-test-suite --log_level=message
& "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
cmake-win-with-options:
runs-on: windows-2022
steps:
Expand All @@ -134,7 +136,7 @@ jobs:
variant: sccache
- name: Setup
run: |
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.82.0/binaries/boost_1_82_0-msvc-14.3-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
choco install -y ninja
Expand All @@ -144,12 +146,13 @@ jobs:
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
cmake --preset windows-ci-build-with-nonstandard-options
cmake --build --preset windows-ci-build-with-nonstandard-options
cmake --preset windows-ci-build-with-nonstandard-options -L
cd build/windows-ci-build-with-nonstandard-options
cmake --build . --verbose
cmake --build . --target install
- name: Test
run: |
cd build
.\test-suite\quantlib-test-suite --log_level=message
& "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
cmake-macos:
runs-on: macos-latest
steps:
Expand All @@ -171,9 +174,9 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja
cmake --build .
cmake .. -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja -L
cmake --build . --verbose
cmake --install .
- name: Test
run: |
cd build
./test-suite/quantlib-test-suite --log_level=message
quantlib-test-suite --log_level=message
4 changes: 2 additions & 2 deletions .github/workflows/copyrights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
- name: Check
run: |
./tools/check_copyrights.sh
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-copyright-list-${{ github.ref }}
branch: update-copyright-list-${{ github.ref_name }}
delete-branch: true
commit-message: 'Update copyright list in license'
title: 'Update copyright list in license'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generated-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
find ql -name *.am | xargs touch
make dist
rm QuantLib-*.tar.gz
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-generated-headers-${{ github.ref }}
branch: update-generated-headers-${{ github.ref_name }}
delete-branch: true
commit-message: 'Update generated headers'
title: 'Update generated headers'
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/linux-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
cxx: g++
- name: "gcc 12.x"
shortname: gcc12
tag: kinetic
tag: lunar
cc: gcc
cxx: g++
- name: "Clang 6 (Boost 1.72)"
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
cxx: clang++
- name: "Clang 15"
shortname: clang15
tag: kinetic
tag: lunar
cc: clang
cxx: clang++
- name: "C++14 mode"
Expand Down Expand Up @@ -130,18 +130,24 @@ jobs:
cc: gcc
cxx: g++
configureflags: --enable-intraday
- name: "Throwing in cycles enabled"
shortname: cycles
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-throwing-in-cycles --disable-faster-lazy-objects
- name: "Indexed coupons enabled"
shortname: indexed
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-indexed-coupons
- name: "Standard Library classes enabled"
- name: "Standard Library classes enabled/disabled"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-std-classes
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-any --enable-std-optional
- name: "Thread-safe observer enabled"
shortname: threadsafe
tag: rolling
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/linux-nondefault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
cxx: g++
- name: "gcc 12.x"
shortname: gcc12
tag: kinetic
tag: lunar
cc: gcc
cxx: g++
- name: "Clang 6 (Boost 1.72)"
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
cxx: clang++
- name: "Clang 15"
shortname: clang15
tag: kinetic
tag: lunar
cc: clang
cxx: clang++
- name: "C++14 mode"
Expand All @@ -124,13 +124,13 @@ jobs:
cc: gcc
cxx: g++
configureflags: --enable-unity-build
- name: "Standard Library classes enabled"
- name: "Standard Library classes enabled/disabled"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++17"
configureflags: --enable-std-classes
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-any --enable-std-optional
- name: "OpenMP enabled"
shortname: openmp
tag: rolling
Expand All @@ -146,7 +146,7 @@ jobs:
- name: Build
run: |
./autogen.sh
./configure --disable-static --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --enable-null-as-functions ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
./configure --disable-static --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --disable-faster-lazy-objects --enable-throwing-in-cycles --enable-null-as-functions ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
make -j 2
- name: Run tests
run: |
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
tests: true
- name: "gcc 12.x"
shortname: gcc12
tag: kinetic
tag: lunar
cc: gcc
cxx: g++
tests: true
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
tests: true
- name: "Clang 15"
shortname: clang15
tag: kinetic
tag: lunar
cc: clang
cxx: clang++
tests: true
Expand Down Expand Up @@ -132,19 +132,26 @@ jobs:
cxx: g++
configureflags: --enable-intraday
tests: true
- name: "Throwing in cycles enabled"
shortname: cycles
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-throwing-in-cycles --disable-faster-lazy-objects
tests: true
- name: "Indexed coupons enabled"
shortname: indexed
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-indexed-coupons
tests: true
- name: "Standard Library classes enabled"
- name: "Standard Library classes enabled/disabled"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-std-classes
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-any --enable-std-optional
tests: true
- name: "Thread-safe observer enabled"
shortname: threadsafe
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos-nondefault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
- os: [macos-11]
shortname: stdclasses-11
cxxflags: "-std=c++17"
configureflags: --enable-std-classes
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-optional
- os: [macos-12]
shortname: default-12
- os: [macos-12]
shortname: stdclasses-12
cxxflags: "-std=c++17"
configureflags: --enable-std-classes
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-optional
steps:
- uses: actions/checkout@v3
- name: Setup
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Build
run: |
./autogen.sh
./configure --disable-shared --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --enable-null-as-functions ${{ matrix.configureflags }} CC="clang" CXX="clang++" CXXFLAGS="-O2 -g0 -Wall -Werror -stdlib=libc++ -mmacosx-version-min=10.9 ${{ matrix.cxxflags }}" LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.9"
./configure --disable-shared --enable-error-lines --enable-error-functions --enable-tracing --enable-indexed-coupons --enable-extra-safety-checks --enable-sessions --enable-thread-safe-observer-pattern --enable-intraday --disable-faster-lazy-objects --enable-throwing-in-cycles --enable-null-as-functions ${{ matrix.configureflags }} CC="clang" CXX="clang++" CXXFLAGS="-O2 -g0 -Wall -Werror -stdlib=libc++ -mmacosx-version-min=10.9 ${{ matrix.cxxflags }}" LDFLAGS="-stdlib=libc++ -mmacosx-version-min=10.9"
make -j 3
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: sobolevn/misspell-fixer-action@master
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: misspell-fixes-${{ github.ref }}
branch: misspell-fixes-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fixes by misspell-fixer'
title: 'Typos fixed by misspell-fixer'
Expand Down
Loading

0 comments on commit 02f5e04

Please sign in to comment.