88 - name : Setup
99 run : |
1010 sudo apt update
11- sudo apt install -y libboost-dev ccache
11+ sudo apt install -y libboost-dev ccache ninja-build
1212 - name : Cache
1313 uses : hendrikmuhs/ccache-action@v1.2
1414 with :
15- key : cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
15+ key : cmake-linux-ci-build-${{ github.ref }}
1616 restore-keys : |
17- cmake-linux-ci-build-${{ github.ref }}-${{ github.head_ref }}-
18- cmake-linux-ci-build-${{ github.ref }}-
19- cmake-linux-ci-build-refs/heads/master-
17+ cmake-linux-ci-build-${{ github.ref }}
18+ cmake-linux-ci-build-refs/heads/master
2019 cmake-linux-ci-build-
2120 - name : Compile
22- env :
23- CXXFLAGS : -O2
2421 run : |
2522 mkdir build
2623 cd build
27- cmake .. -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
28- cmake --build . -j2
24+ cmake .. -GNinja - DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
25+ cmake --build .
2926 - name : Test
3027 run : |
3128 cd build
@@ -37,22 +34,19 @@ jobs:
3734 - name : Setup
3835 run : |
3936 sudo apt update
40- sudo apt install -y libboost-all-dev ccache
37+ sudo apt install -y libboost-all-dev ccache ninja-build
4138 - name : Cache
4239 uses : hendrikmuhs/ccache-action@v1.2
4340 with :
44- key : cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
41+ key : cmake-linux-ci-opts-${{ github.ref }}
4542 restore-keys : |
46- cmake-linux-ci-opts-${{ github.ref }}-${{ github.head_ref }}-
47- cmake-linux-ci-opts-${{ github.ref }}-
48- cmake-linux-ci-opts-refs/heads/master-
43+ cmake-linux-ci-opts-${{ github.ref }}
44+ cmake-linux-ci-opts-refs/heads/master
4945 cmake-linux-ci-opts-
5046 - name : Compile
51- env :
52- CXXFLAGS : -O2
5347 run : |
5448 cmake --preset linux-ci-build-with-nonstandard-options
55- cmake --build --preset linux-ci-build-with-nonstandard-options -j2
49+ cmake --build --preset linux-ci-build-with-nonstandard-options
5650 - name : Test
5751 run : |
5852 cd build
@@ -61,66 +55,124 @@ jobs:
6155 runs-on : windows-2022
6256 steps :
6357 - uses : actions/checkout@v3
58+ - name : Cache
59+ uses : hendrikmuhs/ccache-action@v1.2
60+ with :
61+ key : cmake-windows-ci-build-${{ github.ref }}
62+ restore-keys : |
63+ cmake-windows-ci-build-${{ github.ref }}
64+ cmake-windows-ci-build-refs/heads/master
65+ cmake-windows-ci-build-
66+ variant : sccache
67+ - name : Setup
68+ run : |
69+ $Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/binaries/boost_1_81_0-msvc-14.3-64.exe"
70+ (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
71+ Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
72+ choco install -y ninja
73+ - name : Compile
74+ env :
75+ BOOST_ROOT : C:\local\boost
76+ shell : cmd
77+ run : |
78+ mkdir build
79+ cd build
80+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
81+ cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
82+ cmake --build . --verbose
83+ dir ql\*.lib
84+ - name : Test
85+ run : |
86+ cd build
87+ .\test-suite\quantlib-test-suite --log_level=message
88+ cmake-win-dynamic-runtime :
89+ runs-on : windows-2022
90+ steps :
91+ - uses : actions/checkout@v3
92+ - name : Cache
93+ uses : hendrikmuhs/ccache-action@v1.2
94+ with :
95+ key : cmake-windows-ci-dyn-build-${{ github.ref }}
96+ restore-keys : |
97+ cmake-windows-ci-dyn-build-${{ github.ref }}
98+ cmake-windows-ci-dyn-build-refs/heads/master
99+ cmake-windows-ci-dyn-build-
100+ variant : sccache
64101 - name : Setup
65102 run : |
66- $Url = "https://boostorg.jfrog.io/artifactory/main/release/1.78 .0/binaries/boost_1_78_0 -msvc-14.3-64.exe"
103+ $Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81 .0/binaries/boost_1_81_0 -msvc-14.3-64.exe"
67104 (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
68- Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost-1.78.0"
105+ Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
106+ choco install -y ninja
69107 - name : Compile
70108 env :
71- BOOST_ROOT : C:\local\boost-1.78.0
109+ BOOST_ROOT : C:\local\boost
110+ shell : cmd
72111 run : |
73112 mkdir build
74113 cd build
75- cmake ..
76- cmake --build . --config Release
114+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
115+ cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
116+ cmake --build . --verbose
117+ dir ql\*.lib
77118 - name : Test
78119 run : |
79120 cd build
80- .\test-suite\Release\ quantlib-test-suite --log_level=message
121+ .\test-suite\quantlib-test-suite --log_level=message
81122 cmake-win-with-options :
82123 runs-on : windows-2022
83124 steps :
84125 - uses : actions/checkout@v3
126+ - name : Cache
127+ uses : hendrikmuhs/ccache-action@v1.2
128+ with :
129+ key : cmake-windows-ci-opts-${{ github.ref }}
130+ restore-keys : |
131+ cmake-windows-ci-opts-${{ github.ref }}
132+ cmake-windows-ci-opts-refs/heads/master
133+ cmake-windows-ci-opts-
134+ variant : sccache
85135 - name : Setup
86136 run : |
87- $Url = "https://boostorg.jfrog.io/artifactory/main/release/1.78 .0/binaries/boost_1_78_0 -msvc-14.3-64.exe"
137+ $Url = "https://boostorg.jfrog.io/artifactory/main/release/1.81 .0/binaries/boost_1_81_0 -msvc-14.3-64.exe"
88138 (New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
89- Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost-1.78.0"
139+ Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\local\boost"
140+ choco install -y ninja
90141 - name : Compile
91142 env :
92- BOOST_ROOT : C:\local\boost-1.78.0
143+ BOOST_ROOT : C:\local\boost
144+ shell : cmd
93145 run : |
146+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Vc\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.3 || exit 1
94147 cmake --preset windows-ci-build-with-nonstandard-options
95148 cmake --build --preset windows-ci-build-with-nonstandard-options
96149 - name : Test
97150 run : |
98151 cd build
99- .\test-suite\Release\ quantlib-test-suite --log_level=message
152+ .\test-suite\quantlib-test-suite --log_level=message
100153 cmake-macos :
101154 runs-on : macos-latest
102155 steps :
103156 - uses : actions/checkout@v3
104157 - name : Setup
105158 run : |
106- brew install boost ccache
159+ brew install boost ccache ninja
107160 - name : Cache
108161 uses : hendrikmuhs/ccache-action@v1.2
109162 with :
110- key : cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-${{ hashFiles('**/*.hpp', '**/*.cpp') }}
163+ key : cmake-macos-ci-${{ github.ref }}
111164 restore-keys : |
112- cmake-macos-ci-${{ github.ref }}-${{ github.head_ref }}-
113- cmake-macos-ci-${{ github.ref }}-
114- cmake-macos-ci-refs/heads/master-
165+ cmake-macos-ci-${{ github.ref }}
166+ cmake-macos-ci-refs/heads/master
115167 cmake-macos-ci-
116168 - name : Compile
117169 env :
118- CXXFLAGS : -O2 - stdlib=libc++ -mmacosx-version-min=10.9
170+ CXXFLAGS : -stdlib=libc++ -mmacosx-version-min=10.9
119171 run : |
120172 mkdir build
121173 cd build
122- cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
123- cmake --build . -j2
174+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja
175+ cmake --build .
124176 - name : Test
125177 run : |
126178 cd build
0 commit comments