Skip to content

Linux build with non-default configuration #100

Linux build with non-default configuration

Linux build with non-default configuration #100

name: Linux build with non-default configuration
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: "gcc 5.4 (Boost 1.66)"
shortname: gcc5
tag: xenial
cc: gcc
cxx: g++
- name: "gcc 6.3 (Boost 1.66)"
shortname: gcc6
tag: zesty
cc: gcc
cxx: g++
- name: "gcc 7.4 (Boost 1.72)"
shortname: gcc7
tag: bionic
cc: gcc
cxx: g++
- 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.x (Boost 1.82)"
shortname: gcc11
tag: jammy
cc: gcc
cxx: g++
- name: "gcc 12.x"
shortname: gcc12
tag: lunar
cc: gcc
cxx: g++
- name: "gcc 13.x"
shortname: gcc13
tag: mantic
cc: gcc
cxx: g++
- name: "Clang 6 (Boost 1.72)"
shortname: clang6
tag: bionic
cc: clang
cxx: clang++
- 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"
shortname: clang15
tag: lunar
cc: clang
cxx: clang++
- name: "Clang 16"
shortname: clang16
tag: mantic
cc: clang
cxx: clang++
- name: "C++14 mode"
shortname: c++14
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++14"
- 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: "Unity build enabled"
shortname: unity
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-unity-build
- name: "Standard Library classes enabled/disabled"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
cxxflags: "-std=c++17"
configureflags: --disable-std-function --disable-std-tuple --enable-std-pointers --enable-std-any --enable-std-optional
- name: "OpenMP enabled"
shortname: openmp
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-openmp
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
steps:
- uses: actions/checkout@v3
- name: Compiler version
run: |
${{ matrix.cc }} --version
- 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 --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: |
./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`