-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds C++20 builds to the Linux and Mac pipelines and uses QuantLib's build container everywhere. * removed cxx20 windows build due to failure
- Loading branch information
Showing
1 changed file
with
35 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,9 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
disable_aad: ["ON", "OFF"] | ||
cxx: ["17", "20"] | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/lballabio/quantlib-devenv:rolling | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -54,29 +56,30 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
path: QuantLib-Risks-Cpp | ||
- name: Setup | ||
run: | | ||
sudo apt update | ||
sudo apt install -y libboost-dev ccache ninja-build | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: linux-${{ matrix.disable_aad }} | ||
max-size: 650M | ||
- name: Setup | ||
run: | | ||
apt-get update \ | ||
&& apt install -y ccache ninja-build | ||
- name: Configure | ||
run: | | ||
rm -rf ${{ github.workspace }}/install | ||
cd QuantLib | ||
mkdir build | ||
cd build | ||
cmake -G Ninja -DBOOST_ROOT=/usr \ | ||
-DCMAKE_CXX_STANDARD=${{ matrix.cxx }} \ | ||
-DQLRISKS_DISABLE_AAD=${{ matrix.disable_aad }} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/xad;${{ github.workspace }}/QuantLib-Risks-Cpp" \ | ||
-DQL_EXTERNAL_SUBDIRECTORIES="$(pwd)/../../xad;$(pwd)/../../QuantLib-Risks-Cpp" \ | ||
-DQL_EXTRA_LINK_LIBRARIES=QuantLib-Risks \ | ||
-DQL_NULL_AS_FUNCTIONS=ON \ | ||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \ | ||
-DCMAKE_INSTALL_PREFIX=$(pwd)/../../install \ | ||
.. | ||
- name: Compile | ||
run: | | ||
|
@@ -112,7 +115,7 @@ jobs: | |
cd build | ||
cmake -G Ninja -DBOOST_ROOT=/usr \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_PREFIX_PATH=${{ github.workspace }}/install \ | ||
-DCMAKE_PREFIX_PATH=$(pwd)/../../install \ | ||
.. | ||
cmake --build . | ||
./AdjointSwapXAD | ||
|
@@ -125,6 +128,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
disable_aad: ["ON", "OFF"] | ||
cxx: ["17"] | ||
runs-on: windows-2022 | ||
env: | ||
vsvarsall: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat | ||
|
@@ -163,7 +167,15 @@ jobs: | |
mkdir build | ||
cd build | ||
call "${{ env.vsvarsall }}" amd64 | ||
cmake .. -G Ninja -DQLRISKS_DISABLE_AAD=${{ matrix.disable_aad }} -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/xad;${{ github.workspace }}/QuantLib-Risks-Cpp" -DQL_EXTRA_LINK_LIBRARIES=QuantLib-Risks -DQL_NULL_AS_FUNCTIONS=ON -DXAD_STATIC_MSVC_RUNTIME=ON -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | ||
cmake .. -G Ninja -DQLRISKS_DISABLE_AAD=${{ matrix.disable_aad }} ^ | ||
-DCMAKE_CXX_STANDARD=${{ matrix.cxx }} ^ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/xad;${{ github.workspace }}/QuantLib-Risks-Cpp" ^ | ||
-DQL_EXTRA_LINK_LIBRARIES=QuantLib-Risks ^ | ||
-DQL_NULL_AS_FUNCTIONS=ON ^ | ||
-DXAD_STATIC_MSVC_RUNTIME=ON ^ | ||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | ||
- name: Build | ||
shell: cmd | ||
run: | | ||
|
@@ -217,6 +229,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
disable_aad: ["ON", "OFF"] | ||
cxx: ["17", "20"] | ||
runs-on: macos-13 | ||
env: | ||
CXXFLAGS: -stdlib=libc++ -mmacosx-version-min=10.9 | ||
|
@@ -250,6 +263,7 @@ jobs: | |
mkdir build | ||
cd build | ||
cmake -G Ninja -DBOOST_ROOT=/usr \ | ||
-DCMAKE_CXX_STANDARD=${{ matrix.cxx }} \ | ||
-DQLRISKS_DISABLE_AAD=${{ matrix.disable_aad }} \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
|
@@ -298,7 +312,10 @@ jobs: | |
./AdjointSwapXAD | ||
xad-linux-std-classes: | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
container: ghcr.io/lballabio/quantlib-devenv:rolling | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
|
@@ -315,8 +332,8 @@ jobs: | |
path: QuantLib-Risks-Cpp | ||
- name: Setup | ||
run: | | ||
sudo apt update | ||
sudo apt install -y libboost-dev ccache ninja-build | ||
apt-get update \ | ||
&& apt install -y ccache ninja-build \ | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
|
@@ -327,7 +344,14 @@ jobs: | |
cd QuantLib | ||
mkdir build | ||
cd build | ||
cmake -G Ninja -DBOOST_ROOT=/usr -DQL_USE_STD_CLASSES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DQL_EXTERNAL_SUBDIRECTORIES="${{ github.workspace }}/xad;${{ github.workspace }}/QuantLib-Risks-Cpp" -DQL_EXTRA_LINK_LIBRARIES=QuantLib-Risks -DQL_NULL_AS_FUNCTIONS=ON .. | ||
cmake -G Ninja -DBOOST_ROOT=/usr \ | ||
-DQL_USE_STD_CLASSES=ON \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DQL_EXTERNAL_SUBDIRECTORIES="$(pwd)/../../xad;$(pwd)/../../QuantLib-Risks-Cpp" \ | ||
-DQL_EXTRA_LINK_LIBRARIES=QuantLib-Risks \ | ||
-DQL_NULL_AS_FUNCTIONS=ON \ | ||
.. | ||
- name: Compile | ||
run: | | ||
cd QuantLib/build | ||
|