Skip to content

Commit e706ef7

Browse files
committed
Merge QL 1.29
# Conflicts: # CMakeLists.txt # cmake/Platform.cmake # configure.ac # ql/auto_link.hpp # ql/cashflows/cpicoupon.cpp # ql/cashflows/cpicoupon.hpp # ql/cashflows/indexedcashflow.hpp # ql/indexes/inflation/aucpi.hpp # ql/indexes/inflationindex.cpp # ql/math/matrix.hpp # ql/patterns/singleton.hpp # ql/termstructures/inflation/inflationhelpers.cpp # test-suite/CMakeLists.txt
2 parents e0effb4 + 3857747 commit e706ef7

256 files changed

Lines changed: 7886 additions & 3713 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/cmake.yml

Lines changed: 87 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,21 @@ jobs:
88
- name: Setup
99
run: |
1010
sudo apt update
11-
sudo apt install -y libboost-dev ccache
11+
sudo apt install -y libboost-dev ccache ninja-build
1212
- name: Cache
1313
uses: hendrikmuhs/ccache-action@v1.2
1414
with:
15-
key: cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
15+
key: cmake-linux-ci-build-${{ github.ref }}
1616
restore-keys: |
17-
cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-
18-
cmake-linux-ci-build-${{ github.ref }}-
19-
cmake-linux-ci-build-refs/heads/master-
17+
cmake-linux-ci-build-${{ github.ref }}
18+
cmake-linux-ci-build-refs/heads/master
2019
cmake-linux-ci-build-
2120
- name: Compile
22-
env:
23-
CXXFLAGS: -O2
2421
run: |
2522
mkdir build
2623
cd build
27-
cmake .. -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
28-
cmake --build . -j2
24+
cmake .. -GNinja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
25+
cmake --build .
2926
- name: Test
3027
run: |
3128
cd build
@@ -37,22 +34,19 @@ jobs:
3734
- name: Setup
3835
run: |
3936
sudo apt update
40-
sudo apt install -y libboost-all-dev ccache
37+
sudo apt install -y libboost-all-dev ccache ninja-build
4138
- name: Cache
4239
uses: hendrikmuhs/ccache-action@v1.2
4340
with:
44-
key: cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
41+
key: cmake-linux-ci-opts-${{ github.ref }}
4542
restore-keys: |
46-
cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-
47-
cmake-linux-ci-opts-${{ github.ref }}-
48-
cmake-linux-ci-opts-refs/heads/master-
43+
cmake-linux-ci-opts-${{ github.ref }}
44+
cmake-linux-ci-opts-refs/heads/master
4945
cmake-linux-ci-opts-
5046
- name: Compile
51-
env:
52-
CXXFLAGS: -O2
5347
run: |
5448
cmake --preset linux-ci-build-with-nonstandard-options
55-
cmake --build --preset linux-ci-build-with-nonstandard-options -j2
49+
cmake --build --preset linux-ci-build-with-nonstandard-options
5650
- name: Test
5751
run: |
5852
cd build
@@ -61,66 +55,124 @@ jobs:
6155
runs-on: windows-2022
6256
steps:
6357
- uses: actions/checkout@v3
58+
- name: Cache
59+
uses: hendrikmuhs/ccache-action@v1.2
60+
with:
61+
key: cmake-windows-ci-build-${{ github.ref }}
62+
restore-keys: |
63+
cmake-windows-ci-build-${{ github.ref }}
64+
cmake-windows-ci-build-refs/heads/master
65+
cmake-windows-ci-build-
66+
variant: sccache
67+
- name: Setup
68+
run: |
69+
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
70+
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
71+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
72+
choco install -y ninja
73+
- name: Compile
74+
env:
75+
BOOST_ROOT: C:\local\boost
76+
shell: cmd
77+
run: |
78+
mkdir build
79+
cd build
80+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
81+
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
82+
cmake --build . --verbose
83+
dir ql\*.lib
84+
- name: Test
85+
run: |
86+
cd build
87+
.\test-suite\quantlib-test-suite --log_level=message
88+
cmake-win-dynamic-runtime:
89+
runs-on: windows-2022
90+
steps:
91+
- uses: actions/checkout@v3
92+
- name: Cache
93+
uses: hendrikmuhs/ccache-action@v1.2
94+
with:
95+
key: cmake-windows-ci-dyn-build-${{ github.ref }}
96+
restore-keys: |
97+
cmake-windows-ci-dyn-build-${{ github.ref }}
98+
cmake-windows-ci-dyn-build-refs/heads/master
99+
cmake-windows-ci-dyn-build-
100+
variant: sccache
64101
- name: Setup
65102
run: |
66-
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/binaries/boost_1_78_0-msvc-14.3-64.exe"
103+
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
67104
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
68-
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost-1.78.0"
105+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
106+
choco install -y ninja
69107
- name: Compile
70108
env:
71-
BOOST_ROOT: C:\local\boost-1.78.0
109+
BOOST_ROOT: C:\local\boost
110+
shell: cmd
72111
run: |
73112
mkdir build
74113
cd build
75-
cmake ..
76-
cmake --build . --config Release
114+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
115+
cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
116+
cmake --build . --verbose
117+
dir ql\*.lib
77118
- name: Test
78119
run: |
79120
cd build
80-
.\test-suite\Release\quantlib-test-suite --log_level=message
121+
.\test-suite\quantlib-test-suite --log_level=message
81122
cmake-win-with-options:
82123
runs-on: windows-2022
83124
steps:
84125
- uses: actions/checkout@v3
126+
- name: Cache
127+
uses: hendrikmuhs/ccache-action@v1.2
128+
with:
129+
key: cmake-windows-ci-opts-${{ github.ref }}
130+
restore-keys: |
131+
cmake-windows-ci-opts-${{ github.ref }}
132+
cmake-windows-ci-opts-refs/heads/master
133+
cmake-windows-ci-opts-
134+
variant: sccache
85135
- name: Setup
86136
run: |
87-
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/binaries/boost_1_78_0-msvc-14.3-64.exe"
137+
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
88138
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
89-
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost-1.78.0"
139+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
140+
choco install -y ninja
90141
- name: Compile
91142
env:
92-
BOOST_ROOT: C:\local\boost-1.78.0
143+
BOOST_ROOT: C:\local\boost
144+
shell: cmd
93145
run: |
146+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
94147
cmake --preset windows-ci-build-with-nonstandard-options
95148
cmake --build --preset windows-ci-build-with-nonstandard-options
96149
- name: Test
97150
run: |
98151
cd build
99-
.\test-suite\Release\quantlib-test-suite --log_level=message
152+
.\test-suite\quantlib-test-suite --log_level=message
100153
cmake-macos:
101154
runs-on: macos-latest
102155
steps:
103156
- uses: actions/checkout@v3
104157
- name: Setup
105158
run: |
106-
brew install boost ccache
159+
brew install boost ccache ninja
107160
- name: Cache
108161
uses: hendrikmuhs/ccache-action@v1.2
109162
with:
110-
key: cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
163+
key: cmake-macos-ci-${{ github.ref }}
111164
restore-keys: |
112-
cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-
113-
cmake-macos-ci-${{ github.ref }}-
114-
cmake-macos-ci-refs/heads/master-
165+
cmake-macos-ci-${{ github.ref }}
166+
cmake-macos-ci-refs/heads/master
115167
cmake-macos-ci-
116168
- name: Compile
117169
env:
118-
CXXFLAGS: -O2 -stdlib=libc++ -mmacosx-version-min=10.9
170+
CXXFLAGS: -stdlib=libc++ -mmacosx-version-min=10.9
119171
run: |
120172
mkdir build
121173
cd build
122-
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
123-
cmake --build . -j2
174+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja
175+
cmake --build .
124176
- name: Test
125177
run: |
126178
cd build

.github/workflows/coveralls.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Coverage report
2-
on: [push, pull_request]
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
37
jobs:
48
coverage:
59
runs-on: ubuntu-latest

.github/workflows/doxygen.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ jobs:
66
steps:
77
- uses: actions/checkout@v3
88
- name: Setup
9+
env:
10+
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
911
run: |
10-
rm -f /usr/local/bin/2to3
1112
brew update
1213
brew install automake boost doxygen graphviz
1314
./autogen.sh

.github/workflows/linux-full-tests.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Linux build with full test matrix
2-
on: workflow_dispatch
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
workflow_dispatch:
36
jobs:
47
build:
58
runs-on: ubuntu-latest
@@ -145,12 +148,6 @@ jobs:
145148
cc: gcc
146149
cxx: g++
147150
configureflags: --enable-thread-safe-observer-pattern
148-
- name: "Thread-safe singleton init enabled"
149-
shortname: threadsafeinit
150-
tag: rolling
151-
cc: gcc
152-
cxx: g++
153-
configureflags: --enable-thread-safe-singleton-init
154151
- name: "Sessions enabled"
155152
shortname: sessions
156153
tag: rolling
@@ -175,11 +172,10 @@ jobs:
175172
- name: Cache
176173
uses: hendrikmuhs/ccache-action@v1.2
177174
with:
178-
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
175+
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
179176
restore-keys: |
180-
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
181-
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-
182-
linux-ci-build-${{ matrix.shortname }}-refs/heads/master-
177+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
178+
linux-ci-build-${{ matrix.shortname }}-refs/heads/master
183179
linux-ci-build-${{ matrix.shortname }}-
184180
- name: Compiler version
185181
run: |
@@ -199,8 +195,5 @@ jobs:
199195
run: |
200196
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
201197
echo "#include <ql/quantlib.hpp>" > test2.cpp
202-
if test ${{ matrix.shortname }} = sessions ; then
203-
echo "namespace QuantLib { ThreadKey sessionId() { return 0; } }" >> test2.cpp
204-
fi
205198
make install
206199
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs`

.github/workflows/linux-nondefault.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Linux build with non-default configuration
2-
on: workflow_dispatch
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
workflow_dispatch:
36
jobs:
47
build:
58
runs-on: ubuntu-latest
@@ -154,6 +157,6 @@ jobs:
154157
- name: Check global header
155158
run: |
156159
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
157-
echo "#include <ql/quantlib.hpp>" > test2.cpp && echo "namespace QuantLib { ThreadKey sessionId() { return 0; } }" >> test2.cpp
160+
echo "#include <ql/quantlib.hpp>" > test2.cpp
158161
make install
159162
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs`

.github/workflows/linux.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,6 @@ jobs:
153153
cxx: g++
154154
configureflags: --enable-thread-safe-observer-pattern
155155
tests: true
156-
- name: "Thread-safe singleton init enabled"
157-
shortname: threadsafeinit
158-
tag: rolling
159-
cc: gcc
160-
cxx: g++
161-
configureflags: --enable-thread-safe-singleton-init
162-
tests: true
163156
- name: "Sessions enabled"
164157
shortname: sessions
165158
tag: rolling
@@ -194,11 +187,10 @@ jobs:
194187
- name: Cache
195188
uses: hendrikmuhs/ccache-action@v1.2
196189
with:
197-
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
190+
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
198191
restore-keys: |
199-
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-${{ github.head_ref }}-
200-
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}-
201-
linux-ci-build-${{ matrix.shortname }}-refs/heads/master-
192+
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
193+
linux-ci-build-${{ matrix.shortname }}-refs/heads/master
202194
linux-ci-build-${{ matrix.shortname }}-
203195
- name: Compiler version
204196
run: |
@@ -221,8 +213,5 @@ jobs:
221213
run: |
222214
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
223215
echo "#include <ql/quantlib.hpp>" > test2.cpp
224-
if test ${{ matrix.shortname }} = sessions ; then
225-
echo "namespace QuantLib { ThreadKey sessionId() { return 0; } }" >> test2.cpp
226-
fi
227216
make install
228217
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs` ${{ matrix.moreflags }}

.github/workflows/macos-nondefault.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Mac OS build with non-default configuration
2-
on: workflow_dispatch
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0'
5+
workflow_dispatch:
36
jobs:
47
build:
58
runs-on: ${{ matrix.os }}

.github/workflows/macos.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ jobs:
1919
- name: Cache
2020
uses: hendrikmuhs/ccache-action@v1.2
2121
with:
22-
key: ${{ matrix.os }}-${{ matrix.shortname }}-build-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp', '**/macos.yml') }}
22+
key: macos-ci-build-${{ matrix.shortname }}-${{ github.ref }}
2323
restore-keys: |
24-
${{ matrix.os }}-${{ matrix.shortname }}-build-${{ github.ref }}-${{ github.head_ref }}-
25-
${{ matrix.os }}-${{ matrix.shortname }}-build-${{ github.ref }}-
26-
${{ matrix.os }}-${{ matrix.shortname }}-build-refs/heads/master-
27-
${{ matrix.os }}-${{ matrix.shortname }}-build-
24+
macos-ci-build-${{ matrix.shortname }}-${{ github.ref }}
25+
macos-ci-build-${{ matrix.shortname }}-refs/heads/master
26+
macos-ci-build-${{ matrix.shortname }}-
2827
- name: Build
2928
run: |
3029
./autogen.sh

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
staleness-check:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/stale@v6
9+
- uses: actions/stale@v7
1010
with:
1111
repo-token: ${{ secrets.GITHUB_TOKEN }}
1212
stale-issue-message: 'This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.'

.github/workflows/test-times.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ jobs:
88
- name: Cache
99
uses: hendrikmuhs/ccache-action@v1.2
1010
with:
11-
key: linux-ci-build-times-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
11+
key: linux-ci-test-times-${{ github.ref }}
1212
restore-keys: |
13-
linux-ci-build-times-${{ github.ref }}-${{ github.head_ref }}-
14-
linux-ci-build-times-${{ github.ref }}-
15-
linux-ci-build-times-refs/heads/master-
16-
linux-ci-build-times-
13+
linux-ci-test-times-${{ github.ref }}
14+
linux-ci-test-times-refs/heads/master
15+
linux-ci-test-times-
1716
- name: Setup
1817
run: |
1918
sudo apt update

0 commit comments

Comments
 (0)