Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nistick21 authored Apr 8, 2024
2 parents 828f45e + 7468a2f commit 3ee08a0
Show file tree
Hide file tree
Showing 197 changed files with 7,082 additions and 3,219 deletions.
6 changes: 0 additions & 6 deletions .build/csharp.build

This file was deleted.

8 changes: 0 additions & 8 deletions .build/java.build

This file was deleted.

12 changes: 0 additions & 12 deletions .build/python3.build

This file was deleted.

7 changes: 0 additions & 7 deletions .build/scala.build

This file was deleted.

6 changes: 6 additions & 0 deletions .ci/csharp.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

./autogen.sh
./configure CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C CSharp
4 changes: 4 additions & 0 deletions .ci/csharp.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

make -C CSharp check
2 changes: 2 additions & 0 deletions .ci/csharp.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
set -e
9 changes: 9 additions & 0 deletions .ci/java-new.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

./autogen.sh
./configure --disable-java-finalizer --enable-java-autocloseable \
--with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux \
CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C Java
4 changes: 4 additions & 0 deletions .ci/java-new.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

make -C Java check
2 changes: 2 additions & 0 deletions .ci/java-new.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
set -e
8 changes: 8 additions & 0 deletions .ci/java-old.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

./autogen.sh
./configure --with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux \
CC=clang CXX=clang++ CXXFLAGS='-O2'
make -C Java
4 changes: 4 additions & 0 deletions .ci/java-old.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

make -C Java check
2 changes: 2 additions & 0 deletions .ci/java-old.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
set -e
7 changes: 7 additions & 0 deletions .ci/python.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

./autogen.sh
./configure PYTHON=/usr/bin/python3 CC=clang CXX=clang++ CXXFLAGS='-O1'
make -C Python
make -C Python wheel
11 changes: 11 additions & 0 deletions .ci/python.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

make -C Python check

. .venv/bin/activate
for i in Python/examples/*.py
do
echo "$i"
python "$i" || break -1
done
8 changes: 8 additions & 0 deletions .ci/python.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set -e

python3 -m venv .venv
. .venv/bin/activate
pip install Python/dist/QuantLib-*.whl
grep -v QuantLib binder/requirements.txt > Python/examples/requirements.txt
pip install -r Python/examples/requirements.txt
8 changes: 4 additions & 4 deletions .build/r.build → .ci/r.build
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
set -e

mkdir -p ~/.R
echo 'CC=clang' > ~/.R/Makevars
echo 'CXX=clang++' >> ~/.R/Makevars

./autogen.sh \
&& ./configure CXXFLAGS='-O0' \
&& make -C R \
&& make -C R check
./autogen.sh
./configure CXXFLAGS='-O0'
make -C R
9 changes: 9 additions & 0 deletions .ci/r.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
set -e

echo Execute Scripts in demo folder
for fn in ./R/demo/*.R
do
echo $fn
Rscript "$fn" || break -1
done
4 changes: 4 additions & 0 deletions .ci/r.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

R CMD INSTALL ./R.Rcheck/QuantLib
7 changes: 7 additions & 0 deletions .ci/scala.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

./autogen.sh
./configure --with-jdk-include=/usr/lib/jvm/default-java/include \
--with-jdk-system-include=/usr/lib/jvm/default-java/include/linux CXXFLAGS='-O2'
make -C Java
4 changes: 4 additions & 0 deletions .ci/scala.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -e

make -C Scala check
2 changes: 2 additions & 0 deletions .ci/scala.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
set -e
6 changes: 3 additions & 3 deletions .github/workflows/copyrights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
copyrights:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check
run: |
./tools/check_copyrights.sh
- uses: peter-evans/create-pull-request@v3
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-copyright-list-${{ github.ref }}
branch: update-copyright-list-${{ github.ref_name }}
delete-branch: true
commit-message: 'Update copyright list in license'
title: 'Update copyright list in license'
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/devenv-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Build quantlib-swig-devenv Docker images
on:
schedule:
- cron: '0 0 * * 6'
workflow_dispatch:
jobs:
docker-images-base:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Checkout latest QuantLib master
uses: actions/checkout@v4
with:
repository: lballabio/QuantLib
path: dockerfiles/QuantLib
- name: Build Docker images
working-directory: dockerfiles
run: |
rm -rf QuantLib/.git
docker build -f ci.base.Dockerfile --build-arg tag=rolling -t ghcr.io/lballabio/quantlib-swig-devenv:base .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:base
docker-images-ql:
runs-on: ubuntu-20.04
needs: docker-images-base
strategy:
matrix:
tag: [default, threadsafe]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.tag }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.tag }}
docker-images-base-languages:
runs-on: ubuntu-20.04
needs: docker-images-ql
strategy:
matrix:
lang: [python, csharp, java, r]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.lang }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }}
docker-images-dependent-languages:
runs-on: ubuntu-20.04
needs: docker-images-base-languages
strategy:
matrix:
lang: [scala]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
working-directory: dockerfiles
run: |
docker build -f ci.${{ matrix.lang }}.Dockerfile -t ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }} .
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_PAT }}
- name: Push Docker images
run: |
docker push ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.lang }}
12 changes: 0 additions & 12 deletions .github/workflows/link-check.yml

This file was deleted.

29 changes: 24 additions & 5 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
name: Linux build
on: [push, pull_request, workflow_dispatch]
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [python3, java, csharp, r, scala]
include:
- language: python
- language: java
config: -old
- language: java
config: -new
- language: csharp
- language: r
- language: scala
container: ghcr.io/lballabio/quantlib-swig-devenv:${{ matrix.language }}
steps:
- uses: actions/checkout@v2
- name: Build and check
- uses: actions/checkout@v4
- name: Build
run: |
./.build/${{ matrix.language }}.build
./.ci/${{ matrix.language }}${{ matrix.config }}.build
- name: Install
run: |
./.ci/${{ matrix.language }}${{ matrix.config }}.install
- name: Check
run: |
./.ci/${{ matrix.language }}${{ matrix.config }}.check
6 changes: 3 additions & 3 deletions .github/workflows/misspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: sobolevn/misspell-fixer-action@master
- uses: peter-evans/create-pull-request@v3
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: misspell-fixes-${{ github.ref }}
branch: misspell-fixes-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fixes by misspell-fixer'
title: 'Typos fixed by misspell-fixer'
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/namespaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
namespaces:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check
run: |
sed -i -e 's/boost::shared_ptr/ext::shared_ptr/g' SWIG/*
Expand All @@ -16,10 +16,12 @@ jobs:
sed -i -e 's/boost::tuple/ext::tuple/g' SWIG/*
sed -i -e 's/boost::get/ext::get/g' SWIG/*
sed -i -e 's/boost::function/ext::function/g' SWIG/*
- uses: peter-evans/create-pull-request@v3
sed -i -e 's/boost::optional/ext::optional/g' SWIG/*
sed -i -e 's/boost::none/ext::nullopt/g' SWIG/*
- uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: fix-boost-namespace-${{ github.ref }}
branch: fix-boost-namespace-${{ github.ref_name }}
delete-branch: true
commit-message: 'Fix uses of boost namespace'
title: 'Fix uses of boost namespace'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
staleness-check:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
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.'
Expand Down
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ CSharp/cpp/quantlib_wrap.cpp
CSharp/cpp/quantlib_wrap.h
CSharp/cpp/build
CSharp/csharp/obj
CSharp/examples/bin
CSharp/examples/obj
CSharp/examples/*/bin
CSharp/examples/*/obj
CSharp/.vs/
Java/bin/
Java/quantlib_wrap.cpp
Expand Down Expand Up @@ -58,6 +58,7 @@ testCaseCollection.xml
*.lo
*.o
*.so
*.dylib
.build-stamp
*.pyc
*.exe
Expand Down Expand Up @@ -94,3 +95,4 @@ R/R/QuantLib.R
R/QuantLib.RData

.vscode
**/venv
Loading

0 comments on commit 3ee08a0

Please sign in to comment.