├── .gitignore ├── README.md ├── quantlib-swig-devenv ├── Dockerfile.csharp ├── Dockerfile.scala ├── Dockerfile.java ├── Dockerfile.r ├── Dockerfile.python3 ├── Dockerfile.default ├── Dockerfile.threadsafe └── Dockerfile.base ├── quantlib-devenv └── Dockerfile ├── quantlib-jupyter ├── Dockerfile └── Hello world.ipynb ├── boost └── Dockerfile ├── LICENSE ├── Makefile └── .github └── workflows ├── quantlib-devenv-images.yml └── quantlib-swig-devenv-images.yml /.gitignore: -------------------------------------------------------------------------------- 1 | .ipynb_checkpoints 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This repository was used to create images for building QuantLib and QuantLib-SWIG in CI builds. It is now decommissioned. 2 | 3 | Those workflows and the support files have been migrated to the QuantLib and QuantLib-SWIG repositories. 4 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.csharp: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:threadsafe 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN cd /tmp \ 6 | && wget https://dot.net/v1/dotnet-install.sh \ 7 | && bash dotnet-install.sh --install-dir /usr/local/bin/ -c 6.0 8 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.scala: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:java 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN apt-get update \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get install -y scala \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* 9 | 10 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.java: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:threadsafe 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN apt-get update \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get install -y default-jdk \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* 9 | 10 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.r: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:default 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN apt-get update \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get install -y r-base-dev texlive \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* 9 | 10 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.python3: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:default 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN apt-get update \ 6 | && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-dev python3-pip python3-venv \ 7 | && apt-get clean \ 8 | && rm -rf /var/lib/apt/lists/* 9 | -------------------------------------------------------------------------------- /quantlib-devenv/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG tag=latest 2 | FROM ghcr.io/lballabio/boost:${tag} 3 | MAINTAINER Luigi Ballabio 4 | LABEL Description="A development environment for building QuantLib on Travis CI" 5 | 6 | RUN apt-get update \ 7 | && DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake libtool ccache cmake clang git \ 8 | && apt-get clean \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | CMD bash 12 | 13 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.default: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:base 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN cd /QuantLib \ 6 | && ./autogen.sh \ 7 | && ./configure --enable-throwing-in-cycles --enable-unity-build --disable-static --disable-test-suite --enable-skip-examples CC=clang CXX=clang++ CXXFLAGS='-O3 -g0' \ 8 | && make -j 4 install \ 9 | && cd .. && rm -rf /QuantLib 10 | 11 | RUN ldconfig 12 | 13 | CMD bash 14 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.threadsafe: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/lballabio/quantlib-swig-devenv:base 2 | MAINTAINER Luigi Ballabio 3 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 4 | 5 | RUN cd /QuantLib \ 6 | && ./autogen.sh \ 7 | && ./configure --enable-thread-safe-observer-pattern --enable-throwing-in-cycles --enable-unity-build --disable-static --disable-test-suite --enable-skip-examples CC=clang CXX=clang++ CXXFLAGS='-O3 -g0' \ 8 | && make -j 4 install \ 9 | && cd .. && rm -rf /QuantLib 10 | 11 | RUN ldconfig 12 | 13 | CMD bash 14 | -------------------------------------------------------------------------------- /quantlib-jupyter/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG tag=latest 2 | FROM python:${tag} 3 | MAINTAINER Luigi Ballabio 4 | LABEL Description="A Jupyter notebook server with the QuantLib Python module available" 5 | 6 | RUN pip install --no-cache-dir quantlib jupyter jupyterlab matplotlib numpy scipy pandas ipywidgets RISE 7 | 8 | RUN jupyter-nbextension install rise --py --sys-prefix 9 | RUN jupyter-nbextension install widgetsnbextension --py --sys-prefix \ 10 | && jupyter-nbextension enable widgetsnbextension --py --sys-prefix 11 | 12 | EXPOSE 8888 13 | 14 | RUN mkdir /notebooks 15 | VOLUME /notebooks 16 | COPY *.ipynb /notebooks/ 17 | 18 | CMD jupyter notebook --no-browser --allow-root --ip=0.0.0.0 --port=8888 --notebook-dir=/notebooks 19 | 20 | -------------------------------------------------------------------------------- /boost/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG tag=latest 2 | FROM ubuntu:${tag} 3 | MAINTAINER Luigi Ballabio 4 | LABEL Description="Provide a building environment where the Boost C++ libraries are available" 5 | 6 | RUN apt-get update \ 7 | && DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential wget libbz2-dev \ 8 | && apt-get clean \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | ARG boost_version 12 | ARG boost_dir 13 | ENV boost_version ${boost_version} 14 | 15 | RUN wget https://boostorg.jfrog.io/artifactory/main/release/${boost_version}/source/${boost_dir}.tar.gz \ 16 | && tar xfz ${boost_dir}.tar.gz \ 17 | && rm ${boost_dir}.tar.gz \ 18 | && cd ${boost_dir} \ 19 | && ./bootstrap.sh \ 20 | && ./b2 --without-python --prefix=/usr -j 4 link=shared runtime-link=shared install \ 21 | && cd .. && rm -rf ${boost_dir} && ldconfig 22 | 23 | CMD bash 24 | 25 | -------------------------------------------------------------------------------- /quantlib-jupyter/Hello world.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "from QuantLib import *" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "print(\"Hello World! It is\", Date.todaysDate())" 19 | ] 20 | } 21 | ], 22 | "metadata": { 23 | "kernelspec": { 24 | "display_name": "Python 3", 25 | "language": "python", 26 | "name": "python3" 27 | }, 28 | "language_info": { 29 | "codemirror_mode": { 30 | "name": "ipython", 31 | "version": 3 32 | }, 33 | "file_extension": ".py", 34 | "mimetype": "text/x-python", 35 | "name": "python", 36 | "nbconvert_exporter": "python", 37 | "pygments_lexer": "ipython3", 38 | "version": "3.6.5" 39 | } 40 | }, 41 | "nbformat": 4, 42 | "nbformat_minor": 1 43 | } 44 | -------------------------------------------------------------------------------- /quantlib-swig-devenv/Dockerfile.base: -------------------------------------------------------------------------------- 1 | ARG tag=latest 2 | FROM ghcr.io/lballabio/boost:${tag} 3 | MAINTAINER Luigi Ballabio 4 | LABEL Description="A development environment for building QuantLib-SWIG on Travis CI" 5 | 6 | RUN apt-get update \ 7 | && DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake libtool \ 8 | make libpcre2-dev clang git \ 9 | && apt-get clean \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | ENV swig_version=4.1.1 13 | 14 | RUN wget http://downloads.sourceforge.net/project/swig/swig/swig-${swig_version}/swig-${swig_version}.tar.gz \ 15 | && tar xfz swig-${swig_version}.tar.gz \ 16 | && rm swig-${swig_version}.tar.gz \ 17 | && cd swig-${swig_version} \ 18 | && ./configure --prefix=/usr CXXFLAGS=-O3 \ 19 | && make -j 4 && make install \ 20 | && cd .. && rm -rf swig-${swig_version} 21 | 22 | RUN mkdir /QuantLib 23 | COPY QuantLib /QuantLib 24 | 25 | RUN rm /usr/lib/libboost_unit_test_framework.so* 26 | 27 | CMD bash 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, Luigi Ballabio 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: all boost quantlib-devenv quantlib-swig-devenv quantlib-jupyter 3 | 4 | TAG:=latest 5 | 6 | all: 7 | 8 | boost: 9 | cd boost && docker build --build-arg tag=$(TAG) \ 10 | --build-arg boost_version=$(BOOST_VERSION) \ 11 | --build-arg boost_dir=boost_$(subst .,_,$(BOOST_VERSION)) \ 12 | -t ghcr.io/lballabio/boost:$(TAG) . 13 | 14 | quantlib-devenv: 15 | cd quantlib-devenv && docker build --build-arg tag=$(TAG) -t ghcr.io/lballabio/quantlib-devenv:$(TAG) . 16 | 17 | quantlib-swig-devenv: 18 | cd quantlib-swig-devenv && docker build -f Dockerfile.base --build-arg tag=$(TAG) -t ghcr.io/lballabio/quantlib-swig-devenv:base . \ 19 | && docker build -f Dockerfile.default -t ghcr.io/lballabio/quantlib-swig-devenv:default . \ 20 | && docker build -f Dockerfile.threadsafe -t ghcr.io/lballabio/quantlib-swig-devenv:threadsafe . \ 21 | && docker build -f Dockerfile.python3 -t ghcr.io/lballabio/quantlib-swig-devenv:python3 . \ 22 | && docker build -f Dockerfile.csharp -t ghcr.io/lballabio/quantlib-swig-devenv:csharp . \ 23 | && docker build -f Dockerfile.java -t ghcr.io/lballabio/quantlib-swig-devenv:java . \ 24 | && docker build -f Dockerfile.r -t ghcr.io/lballabio/quantlib-swig-devenv:r . \ 25 | && docker build -f Dockerfile.scala -t ghcr.io/lballabio/quantlib-swig-devenv:scala . 26 | 27 | quantlib-jupyter: 28 | cd quantlib-jupyter && docker build --build-arg tag=$(TAG) -t lballabio/quantlib-jupyter:$(TAG) . 29 | -------------------------------------------------------------------------------- /.github/workflows/quantlib-devenv-images.yml: -------------------------------------------------------------------------------- 1 | name: Build quantlib-devenv Docker images 2 | on: 3 | workflow_dispatch: 4 | inputs: 5 | boostVersion: 6 | description: 'Boost version' 7 | required: true 8 | env: 9 | ROLLING: lunar 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | tag: [lunar, mantic] 16 | steps: 17 | - uses: actions/checkout@v3 18 | - name: Build images 19 | run: | 20 | make boost TAG=${{ matrix.tag }} BOOST_VERSION=${{ github.event.inputs.boostVersion }} 21 | make quantlib-devenv TAG=${{ matrix.tag }} 22 | docker tag ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}-${{ github.event.inputs.boostVersion }} 23 | if test "${{ matrix.tag }}" = "$ROLLING" ; then 24 | docker tag ghcr.io/lballabio/boost:${{ matrix.tag }} ghcr.io/lballabio/boost:rolling 25 | docker tag ghcr.io/lballabio/boost:${{ matrix.tag }} ghcr.io/lballabio/boost:${{ github.event.inputs.boostVersion }} 26 | docker tag ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} ghcr.io/lballabio/quantlib-devenv:rolling 27 | fi 28 | - name: Login to GitHub Container Registry 29 | uses: docker/login-action@v2 30 | with: 31 | registry: ghcr.io 32 | username: ${{ github.repository_owner }} 33 | password: ${{ secrets.GHCR_PAT }} 34 | - name: Push Docker images 35 | run: | 36 | docker push ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}-${{ github.event.inputs.boostVersion }} 37 | docker push ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }} 38 | if test "${{ matrix.tag }}" = "$ROLLING" ; then 39 | docker push ghcr.io/lballabio/boost:rolling 40 | docker push ghcr.io/lballabio/boost:${{ github.event.inputs.boostVersion }} 41 | docker push ghcr.io/lballabio/quantlib-devenv:rolling 42 | fi 43 | -------------------------------------------------------------------------------- /.github/workflows/quantlib-swig-devenv-images.yml: -------------------------------------------------------------------------------- 1 | name: Build quantlib-swig-devenv Docker images 2 | on: workflow_dispatch 3 | jobs: 4 | build-base: 5 | runs-on: ubuntu-20.04 6 | steps: 7 | - uses: actions/checkout@v3 8 | - name: Checkout latest QuantLib master 9 | uses: actions/checkout@v3 10 | with: 11 | repository: lballabio/QuantLib 12 | path: quantlib-swig-devenv/QuantLib 13 | - name: Build Docker images 14 | working-directory: quantlib-swig-devenv 15 | run: | 16 | rm -rf QuantLib/.git 17 | docker build -f Dockerfile.base --build-arg tag=rolling -t ghcr.io/lballabio/quantlib-swig-devenv:base . 18 | - name: Login to GitHub Container Registry 19 | uses: docker/login-action@v2 20 | with: 21 | registry: ghcr.io 22 | username: ${{ github.repository_owner }} 23 | password: ${{ secrets.GHCR_PAT }} 24 | - name: Push Docker images 25 | run: | 26 | docker push ghcr.io/lballabio/quantlib-swig-devenv:base 27 | build-ql: 28 | runs-on: ubuntu-20.04 29 | needs: build-base 30 | strategy: 31 | matrix: 32 | tag: [default, threadsafe] 33 | steps: 34 | - uses: actions/checkout@v3 35 | - name: Build Docker images 36 | working-directory: quantlib-swig-devenv 37 | run: | 38 | docker build -f Dockerfile.${{ matrix.tag }} -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }} . 39 | - name: Login to GitHub Container Registry 40 | uses: docker/login-action@v2 41 | with: 42 | registry: ghcr.io 43 | username: ${{ github.repository_owner }} 44 | password: ${{ secrets.GHCR_PAT }} 45 | - name: Push Docker images 46 | run: | 47 | docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }} 48 | build-main-languages: 49 | runs-on: ubuntu-20.04 50 | needs: build-ql 51 | strategy: 52 | matrix: 53 | lang: [python3, csharp, java, r] 54 | steps: 55 | - uses: actions/checkout@v3 56 | - name: Build Docker images 57 | working-directory: quantlib-swig-devenv 58 | run: | 59 | docker build -f Dockerfile.${{ matrix.lang }} -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} . 60 | - name: Login to GitHub Container Registry 61 | uses: docker/login-action@v2 62 | with: 63 | registry: ghcr.io 64 | username: ${{ github.repository_owner }} 65 | password: ${{ secrets.GHCR_PAT }} 66 | - name: Push Docker images 67 | run: | 68 | docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} 69 | build-dependent-languages: 70 | runs-on: ubuntu-20.04 71 | needs: build-main-languages 72 | strategy: 73 | matrix: 74 | lang: [scala] 75 | steps: 76 | - uses: actions/checkout@v3 77 | - name: Build Docker images 78 | working-directory: quantlib-swig-devenv 79 | run: | 80 | docker build -f Dockerfile.${{ matrix.lang }} -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} . 81 | - name: Login to GitHub Container Registry 82 | uses: docker/login-action@v2 83 | with: 84 | registry: ghcr.io 85 | username: ${{ github.repository_owner }} 86 | password: ${{ secrets.GHCR_PAT }} 87 | - name: Push Docker images 88 | run: | 89 | docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} 90 | --------------------------------------------------------------------------------