Skip to content

Remove past non-LTS image from default CI build #14

Remove past non-LTS image from default CI build

Remove past non-LTS image from default CI build #14

Workflow file for this run

name: Linux build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: "gcc 9.3 (Boost 1.78)"
shortname: gcc9
tag: focal
cc: gcc
cxx: g++
- name: "gcc 11.4 (Boost 1.82)"
shortname: gcc11
tag: jammy
cc: gcc
cxx: g++
- name: "gcc 13.x"
shortname: gcc13
tag: noble
cc: gcc
cxx: g++
tests: true
- name: "Clang 10 (Boost 1.78)"
shortname: clang10
tag: focal
cc: clang
cxx: clang++
- name: "Clang 14 (Boost 1.82)"
shortname: clang14
tag: jammy
cc: clang
cxx: clang++
- name: "Clang 18"
shortname: clang18
tag: noble
cc: clang
cxx: clang++
cxxflags: -Wno-deprecated-declarations
tests: true
- 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: "Intraday calculations enabled"
shortname: intraday
tag: rolling
cc: gcc
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/disabled"
shortname: stdclasses
tag: rolling
cc: gcc
cxx: g++
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
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-thread-safe-observer-pattern
tests: true
- name: "Sessions enabled"
shortname: sessions
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-sessions
tests: true
- name: "OpenMP enabled"
shortname: openmp
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-openmp
tests: true
- name: "Parallel unit-test runner"
shortname: paralleltests
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-parallel-unit-test-runner
tests: true
- name: "Null as function template"
shortname: nullfunctions
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-null-as-functions
tests: true
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
steps:
- uses: actions/checkout@v4
- name: Cache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
restore-keys: |
linux-ci-build-${{ matrix.shortname }}-${{ github.ref }}
linux-ci-build-${{ matrix.shortname }}-refs/heads/master
linux-ci-build-${{ matrix.shortname }}-
- name: Compiler version
run: |
${{ matrix.cc }} --version
- name: Build
run: |
./autogen.sh
./configure --disable-static ${{ matrix.configureflags }} CC="ccache ${{ matrix.cc }}" CXX="ccache ${{ matrix.cxx }}" CXXFLAGS="-O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }}"
make -j 4
- name: Run tests
if: ${{ matrix.tests }}
run: |
./test-suite/quantlib-test-suite --log_level=message
- name: Run examples
if: ${{ matrix.tests }}
run: |
make check-examples
- name: Check global header
if: ${{ matrix.tests }}
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`