Skip to content

Commit 56cedb5

Browse files
author
Xcelerit Dev Team
committed
Initial commit
0 parents  commit 56cedb5

25 files changed

Lines changed: 3826 additions & 0 deletions

.github/workflows/ci.yaml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# Workflow to run against the corresponding QuantLib release,
2+
# testing if the build and tests are working fine
3+
# Note: In addition to pushes/pull requests, this workflow
4+
# can also be executed manually, and the repositories / branches
5+
# for QuantLib and XAD can be provided in this case.
6+
name: CI
7+
on:
8+
push:
9+
pull_request:
10+
workflow_dispatch:
11+
inputs:
12+
ql_repo:
13+
description: Quantlib repository in <owner>/<repo> format
14+
required: true
15+
default: lballabio/QuantLib
16+
ql_branch:
17+
description: Branch or tag for QuantLib repository
18+
required: true
19+
default: master
20+
xad_repo:
21+
description: XAD repository in <owner>/<repo> format
22+
required: true
23+
default: xcelerit/XAD
24+
xad_branch:
25+
description: Branch or tag for XAD repository
26+
required: true
27+
default: main
28+
schedule:
29+
- cron: '02 5 * * *' # 5:02 every day
30+
env:
31+
ql_repo: ${{ github.event.inputs.ql_repo || 'lballabio/QuantLib' }}
32+
ql_branch: ${{ github.event.inputs.ql_branch || 'master' }}
33+
xad_repo: ${{ github.event.inputs.xad_repo || 'xcelerit/XAD' }}
34+
xad_branch: ${{ github.event.inputs.xad_branch || 'main' }}
35+
jobs:
36+
xad-linux:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
with:
41+
repository: ${{ env.ql_repo }}
42+
ref: ${{ env.ql_branch }}
43+
path: QuantLib
44+
- uses: actions/checkout@v3
45+
with:
46+
repository: ${{ env.xad_repo }}
47+
ref: ${{ env.xad_branch }}
48+
path: XAD
49+
- uses: actions/checkout@v3
50+
with:
51+
path: qlxad
52+
- name: Setup
53+
run: |
54+
sudo apt update
55+
sudo apt install -y libboost-dev ccache ninja-build
56+
- name: ccache
57+
uses: hendrikmuhs/ccache-action@v1.2.5
58+
with:
59+
key: linux
60+
max-size: 650M
61+
- name: Configure
62+
run: |
63+
cd QuantLib
64+
mkdir build
65+
cd build
66+
cmake -G Ninja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/XAD;${{ github.workspace }}/qlxad" -DQL_EXTRA_LINK_LIBRARIES=qlxad -DQL_NULL_AS_FUNCTIONS=ON ..
67+
- name: Compile
68+
run: |
69+
cd QuantLib/build
70+
cmake --build .
71+
- name: Test QuantLib
72+
run: |
73+
cd QuantLib/build
74+
./test-suite/quantlib-test-suite --log_level=message
75+
- name: Test QlXAD
76+
run: |
77+
cd QuantLib/build
78+
./qlxad/test-suite/quantlib-xad-test-suite --log_level=message
79+
xad-win:
80+
runs-on: windows-2022
81+
env:
82+
vsvarsall: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
83+
steps:
84+
- uses: actions/checkout@v3
85+
with:
86+
repository: ${{ env.ql_repo }}
87+
ref: ${{ env.ql_branch }}
88+
path: QuantLib
89+
- uses: actions/checkout@v3
90+
with:
91+
repository: ${{ env.xad_repo }}
92+
ref: ${{ env.xad_branch }}
93+
path: XAD
94+
- uses: actions/checkout@v3
95+
with:
96+
path: qlxad
97+
- name: sccache
98+
uses: hendrikmuhs/ccache-action@v1.2.5
99+
with:
100+
key: windows
101+
variant: sccache
102+
max-size: 650M
103+
- name: Setup
104+
run: |
105+
choco install -y ninja
106+
$Url = "https://boostorg.jfrog.io/artifactory/main/release/1.78.0/binaries/boost_1_78_0-msvc-14.3-64.exe"
107+
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
108+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost-1.78.0"
109+
- name: Configure
110+
env:
111+
BOOST_ROOT: C:\local\boost-1.78.0
112+
shell: cmd
113+
run: |
114+
cd QuantLib
115+
mkdir build
116+
cd build
117+
call "${{ env.vsvarsall }}" amd64 -vcvars_ver=14.3
118+
cmake .. -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/XAD;${{ github.workspace }}/qlxad" -DQL_EXTRA_LINK_LIBRARIES=qlxad -DQL_NULL_AS_FUNCTIONS=ON -DXAD_STATIC_MSVC_RUNTIME=ON
119+
- name: Build
120+
shell: cmd
121+
run: |
122+
cd QuantLib\build
123+
call "${{ env.vsvarsall }}" amd64 -vcvars_ver=14.3
124+
cmake --build .
125+
- name: Test QuantLib
126+
shell: cmd
127+
run: |
128+
cd QuantLib\build
129+
call "${{ env.vsvarsall }}" amd64 -vcvars_ver=14.3
130+
.\test-suite\quantlib-test-suite --log_level=message
131+
- name: Test QlXAD
132+
shell: cmd
133+
run: |
134+
cd QuantLib\build
135+
call "${{ env.vsvarsall }}" amd64 -vcvars_ver=14.3
136+
.\qlxad\test-suite\quantlib-xad-test-suite --log_level=message
137+
xad-macos:
138+
runs-on: macos-latest
139+
env:
140+
CXXFLAGS: -stdlib=libc++ -mmacosx-version-min=10.9
141+
steps:
142+
- uses: actions/checkout@v3
143+
with:
144+
repository: ${{ env.ql_repo }}
145+
ref: ${{ env.ql_branch }}
146+
path: QuantLib
147+
- uses: actions/checkout@v3
148+
with:
149+
repository: ${{ env.xad_repo }}
150+
ref: ${{ env.xad_branch }}
151+
path: XAD
152+
- uses: actions/checkout@v3
153+
with:
154+
path: qlxad
155+
- name: Setup
156+
run: |
157+
brew install boost
158+
brew install ninja
159+
brew install ccache
160+
- name: ccache
161+
uses: hendrikmuhs/ccache-action@v1.2.5
162+
with:
163+
key: macos
164+
max-size: 650M
165+
- name: Configure
166+
run: |
167+
cd QuantLib
168+
mkdir build
169+
cd build
170+
cmake -G Ninja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/XAD;${{ github.workspace }}/qlxad" -DQL_EXTRA_LINK_LIBRARIES=qlxad -DQL_NULL_AS_FUNCTIONS=ON ..
171+
- name: Compile
172+
run: |
173+
cd QuantLib/build
174+
cmake --build .
175+
- name: Test QuantLib
176+
run: |
177+
cd QuantLib/build
178+
./test-suite/quantlib-test-suite --log_level=message
179+
- name: Test QlXAD
180+
run: |
181+
cd QuantLib/build
182+
./qlxad/test-suite/quantlib-xad-test-suite --log_level=message

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Changelog
2+
3+
All notable changes to the qlxad module will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
Note that we follow QuantLib's releases in this repository, with matching version numbers.
9+
10+
## [unreleased]
11+
12+
### Added
13+
14+
### Changed
15+
16+
### Deprecated
17+
18+
### Removed
19+
20+
### Fixed
21+
22+
## [1.28] - 2022-11-17
23+
24+
Initial open-source release, compatible with [QuantLib v1.28](https://github.com/lballabio/QuantLib/releases/tag/QuantLib-v1.28).
25+
26+
27+
[unreleased]: https://github.com/xcelerit/qlxad/compare/v1.28...HEAD
28+
29+
[1.28]: https://github.com/xcelerit/qlxad/tree/v1.28
30+
31+

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
add_subdirectory(ql)
2+
if(MSVC)
3+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
4+
endif()
5+
add_subdirectory(Examples)
6+
add_subdirectory(test-suite)

CODE_OF_CONDUCT.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
22+
- Being respectful of differing opinions, viewpoints, and experiences
23+
24+
- Giving and gracefully accepting constructive feedback
25+
26+
- Accepting responsibility and apologizing to those affected by our mistakes,
27+
and learning from the experience
28+
29+
- Focusing on what is best not just for us as individuals, but for the overall
30+
community
31+
32+
Examples of unacceptable behavior include:
33+
34+
- The use of sexualized language or imagery, and sexual attention or advances of
35+
any kind
36+
37+
- Trolling, insulting or derogatory comments, and personal or political attacks
38+
39+
- Public or private harassment
40+
41+
- Publishing others' private information, such as a physical or email address,
42+
without their explicit permission
43+
44+
- Other conduct which could reasonably be considered inappropriate in a
45+
professional setting
46+
47+
## Enforcement Responsibilities
48+
49+
Community leaders are responsible for clarifying and enforcing our standards of
50+
acceptable behavior and will take appropriate and fair corrective action in
51+
response to any behavior that they deem inappropriate, threatening, offensive,
52+
or harmful.
53+
54+
Community leaders have the right and responsibility to remove, edit, or reject
55+
comments, commits, code, wiki edits, issues, and other contributions that are
56+
not aligned to this Code of Conduct, and will communicate reasons for moderation
57+
decisions when appropriate.
58+
59+
## Scope
60+
61+
This Code of Conduct applies within all community spaces, and also applies when
62+
an individual is officially representing the community in public spaces.
63+
Examples of representing our community include using an official e-mail address,
64+
posting via an official social media account, or acting as an appointed
65+
representative at an online or offline event.
66+
67+
## Enforcement
68+
69+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
70+
reported to the community leaders responsible for enforcement at
71+
xad@xcelerit.com.
72+
All complaints will be reviewed and investigated promptly and fairly.
73+
74+
All community leaders are obligated to respect the privacy and security of the
75+
reporter of any incident.
76+
77+
## Enforcement Guidelines
78+
79+
Community leaders will follow these Community Impact Guidelines in determining
80+
the consequences for any action they deem in violation of this Code of Conduct:
81+
82+
### 1. Correction
83+
84+
**Community Impact**: Use of inappropriate language or other behavior deemed
85+
unprofessional or unwelcome in the community.
86+
87+
**Consequence**: A private, written warning from community leaders, providing
88+
clarity around the nature of the violation and an explanation of why the
89+
behavior was inappropriate. A public apology may be requested.
90+
91+
### 2. Warning
92+
93+
**Community Impact**: A violation through a single incident or series of
94+
actions.
95+
96+
**Consequence**: A warning with consequences for continued behavior. No
97+
interaction with the people involved, including unsolicited interaction with
98+
those enforcing the Code of Conduct, for a specified period of time. This
99+
includes avoiding interactions in community spaces as well as external channels
100+
like social media. Violating these terms may lead to a temporary or permanent
101+
ban.
102+
103+
### 3. Temporary Ban
104+
105+
**Community Impact**: A serious violation of community standards, including
106+
sustained inappropriate behavior.
107+
108+
**Consequence**: A temporary ban from any sort of interaction or public
109+
communication with the community for a specified period of time. No public or
110+
private interaction with the people involved, including unsolicited interaction
111+
with those enforcing the Code of Conduct, is allowed during this period.
112+
Violating these terms may lead to a permanent ban.
113+
114+
### 4. Permanent Ban
115+
116+
**Community Impact**: Demonstrating a pattern of violation of community
117+
standards, including sustained inappropriate behavior, harassment of an
118+
individual, or aggression toward or disparagement of classes of individuals.
119+
120+
**Consequence**: A permanent ban from any sort of public interaction within the
121+
community.
122+
123+
## Attribution
124+
125+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
126+
version 2.1, available at
127+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
128+
129+
Community Impact Guidelines were inspired by
130+
[Mozilla's code of conduct enforcement ladder][mozillacoc].
131+
132+
For answers to common questions about this code of conduct, see the FAQ at
133+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
134+
[https://www.contributor-covenant.org/translations][translations].
135+
136+
[homepage]: https://www.contributor-covenant.org
137+
138+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
139+
140+
[mozillacoc]: https://github.com/mozilla/diversity
141+
142+
[faq]: https://www.contributor-covenant.org/faq
143+
144+
[translations]: https://www.contributor-covenant.org/translations

0 commit comments

Comments
 (0)