1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
name: Linux build with full test matrix
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: "gcc 8.3 (Boost 1.72)"
shortname: gcc8
tag: cosmic
cc: gcc
cxx: g++
- name: "gcc 9.3 (Boost 1.78)"
shortname: gcc9
tag: focal
cc: gcc
cxx: g++
- name: "gcc 10.3 (Boost 1.79)"
shortname: gcc10
tag: hirsute
cc: gcc
cxx: g++
- name: "gcc 11.4 (Boost 1.82)"
shortname: gcc11
tag: jammy
cc: gcc
cxx: g++
- name: "gcc 12.3 (Boost 1.86)"
shortname: gcc12
tag: lunar
cc: gcc
cxx: g++
- name: "gcc 13.3 (Boost 1.89)"
shortname: gcc13
tag: noble
cc: gcc
cxx: g++
- name: "gcc 14.x"
shortname: gcc14
tag: plucky
cc: gcc
cxx: g++
- name: "gcc 15.x"
shortname: gcc15
tag: questing
cc: gcc
cxx: g++
- name: "Clang 7 (Boost 1.72)"
shortname: clang7
tag: cosmic
cc: clang
cxx: clang++
- name: "Clang 8 (Boost 1.72)"
shortname: clang8
tag: disco
cc: clang
cxx: clang++
- name: "Clang 9 (Boost 1.74)"
shortname: clang9
tag: eoan
cc: clang
cxx: clang++
- name: "Clang 10 (Boost 1.78)"
shortname: clang10
tag: focal
cc: clang
cxx: clang++
- name: "Clang 11 (Boost 1.78)"
shortname: clang11
tag: groovy
cc: clang
cxx: clang++
- name: "Clang 12 (Boost 1.79)"
shortname: clang12
tag: hirsute
cc: clang
cxx: clang++
- name: "Clang 13 (Boost 1.79)"
shortname: clang13
tag: impish
cc: clang
cxx: clang++
- name: "Clang 14 (Boost 1.82)"
shortname: clang14
tag: jammy
cc: clang
cxx: clang++
- name: "Clang 15 (Boost 1.86)"
shortname: clang15
tag: lunar
cc: clang
cxx: clang++
- name: "Clang 16 (Boost 1.86)"
shortname: clang16
tag: mantic
cc: clang
cxx: clang++
- name: "Clang 17 (Boost 1.84)"
shortname: clang17
tag: clang-17
cc: clang
cxx: clang++
- name: "Clang 18 (Boost 1.89)"
shortname: clang18
tag: noble
cc: clang
cxx: clang++
- name: "Clang 19 (Boost 1.89)"
shortname: clang19
tag: oracular
cc: clang
cxx: clang++
- name: "Clang 20"
shortname: clang20
tag: plucky
cc: clang
cxx: clang++
- name: "C++17 mode"
shortname: c++17
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++17"
- name: "C++20 mode"
shortname: c++20
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++20"
- name: "C++23 mode"
shortname: c++23
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++23"
- name: "C++26 mode"
shortname: c++26
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++26"
- name: "Unity build enabled"
shortname: unity
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-unity-build
- name: "Intraday calculations enabled"
shortname: intraday
tag: rolling
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"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-std-classes
- name: "Thread-safe observer enabled"
shortname: threadsafe
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-thread-safe-observer-pattern
- name: "Sessions enabled"
shortname: sessions
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-sessions
- name: "OpenMP enabled"
shortname: openmp
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-openmp
- name: "Parallel unit-test runner"
shortname: paralleltests
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-parallel-unit-test-runner
- name: "Null as function template"
shortname: nullfunctions
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-null-as-functions
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
steps:
- uses: actions/checkout@v5
- name: Compiler version
run: |
${{ matrix.cc }} --version
- name: Build
run: |
./autogen.sh
./configure --disable-static ${{ matrix.configureflags }} CC="${{ matrix.cc }}" CXX="${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
cat ql/config.hpp
make -j 4
- name: Run tests
run: |
./test-suite/quantlib-test-suite --log_level=message
- name: Run examples
run: |
make check-examples
- name: Check global header
run: |
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
echo "#include <ql/quantlib.hpp>" > test2.cpp
make install
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs`
|