File: cmake.yml

package info (click to toggle)
quantlib 1.40-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,768 kB
  • sloc: cpp: 398,987; makefile: 6,574; python: 214; sh: 150; lisp: 86
file content (218 lines) | stat: -rw-r--r-- 7,873 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: CMake build
on:
  push:
    branches:
      - '**'
  pull_request:
jobs:
  cmake-linux:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Setup
      run: |
        sudo rm /etc/apt/sources.list.d/microsoft-prod.list
        sudo apt update
        sudo apt install -y libboost-dev ccache ninja-build
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-linux-ci-build-${{ github.ref }}
        restore-keys: |
          cmake-linux-ci-build-${{ github.ref }}
          cmake-linux-ci-build-refs/heads/master
          cmake-linux-ci-build-
    - name: Compile
      run: |
        mkdir build
        cd build
        cmake .. -GNinja -DBOOST_ROOT=/usr -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -L
        cat ql/config.hpp
        cmake --build . --verbose
        sudo cmake --install .
        sudo ldconfig
    - name: Test
      run: |
        quantlib-test-suite --log_level=message
    - name: Run benchmark
      run: |
        quantlib-benchmark --size=1
  cmake-linux-with-options:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v5
    - name: Setup
      run: |
        sudo rm /etc/apt/sources.list.d/microsoft-prod.list
        sudo apt update
        sudo apt install -y libboost-all-dev ccache ninja-build
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-linux-ci-opts-${{ github.ref }}
        restore-keys: |
          cmake-linux-ci-opts-${{ github.ref }}
          cmake-linux-ci-opts-refs/heads/master
          cmake-linux-ci-opts-
    - name: Compile
      run: |
        cmake --preset linux-ci-build-with-nonstandard-options -L
        cd build/linux-ci-build-with-nonstandard-options
        cat ql/config.hpp
        cmake --build . --verbose
        sudo cmake --build . --target install
    - name: Test
      run: |
        quantlib-test-suite --log_level=message
  cmake-win:
    runs-on: windows-2022
    steps:
    - uses: actions/checkout@v5
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-windows-ci-build-${{ github.ref }}
        restore-keys: |
          cmake-windows-ci-build-${{ github.ref }}
          cmake-windows-ci-build-refs/heads/master
          cmake-windows-ci-build-
        variant: sccache
    - name: Setup
      run: |
        $Url = "https://archives.boost.io/release/1.89.0/source/boost_1_89_0.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip")
        Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local
        Rename-Item -Path "C:\local\boost_1_89_0" -NewName "boost"
        $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip")
        Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja
        Add-Content $env:GITHUB_PATH "C:\local\ninja"
    - name: Setup MSVC++ environment
      uses: ilammy/msvc-dev-cmd@v1
      with:
        arch: x64
    - name: Compile
      env:
        BOOST_ROOT: C:\local\boost
      shell: cmd
      run: |
        mkdir build
        cd build
        cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L
        type ql\config.hpp
        cmake --build . --verbose
        cmake --install .
        dir ql\*.lib
    - name: Test
      run: |
        & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
  cmake-win-dynamic-runtime:
    runs-on: windows-2022
    steps:
    - uses: actions/checkout@v5
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-windows-ci-dyn-build-${{ github.ref }}
        restore-keys: |
          cmake-windows-ci-dyn-build-${{ github.ref }}
          cmake-windows-ci-dyn-build-refs/heads/master
          cmake-windows-ci-dyn-build-
        variant: sccache
    - name: Setup
      run: |
        $Url = "https://archives.boost.io/release/1.89.0/source/boost_1_89_0.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip")
        Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local
        Rename-Item -Path "C:\local\boost_1_89_0" -NewName "boost"
        $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip")
        Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja
        Add-Content $env:GITHUB_PATH "C:\local\ninja"
    - name: Setup MSVC++ environment
      uses: ilammy/msvc-dev-cmd@v1
      with:
        arch: x64
    - name: Compile
      env:
        BOOST_ROOT: C:\local\boost
      shell: cmd
      run: |
        mkdir build
        cd build
        cmake .. -GNinja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -L
        type ql\config.hpp
        cmake --build . --verbose
        cmake --install .
        dir ql\*.lib
    - name: Test
      run: |
        & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
  cmake-win-with-options:
    runs-on: windows-2022
    steps:
    - uses: actions/checkout@v5
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-windows-ci-opts-${{ github.ref }}
        restore-keys: |
          cmake-windows-ci-opts-${{ github.ref }}
          cmake-windows-ci-opts-refs/heads/master
          cmake-windows-ci-opts-
        variant: sccache
    - name: Setup
      run: |
        $Url = "https://archives.boost.io/release/1.89.0/source/boost_1_89_0.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\boost.zip")
        Expand-Archive -Path "$RUNNER_TEMP\boost.zip" -DestinationPath C:\local
        Rename-Item -Path "C:\local\boost_1_89_0" -NewName "boost"
        $Url = "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip"
        (New-Object System.Net.WebClient).DownloadFile($Url, "$RUNNER_TEMP\ninja-win.zip")
        Expand-Archive -Path "$RUNNER_TEMP\ninja-win.zip" -DestinationPath C:\local\ninja
        Add-Content $env:GITHUB_PATH "C:\local\ninja"
    - name: Setup MSVC++ environment
      uses: ilammy/msvc-dev-cmd@v1
      with:
        arch: x64
    - name: Compile
      env:
        BOOST_ROOT: C:\local\boost
      shell: cmd
      run: |
        cmake --preset windows-ci-build-with-nonstandard-options -L
        cd build/windows-ci-build-with-nonstandard-options
        type ql\config.hpp
        cmake --build . --verbose
        cmake --build . --target install
    - name: Test
      run: |
        & "C:\Program Files (x86)\QuantLib\bin\quantlib-test-suite" --log_level=message
  cmake-macos:
    runs-on: macos-latest
    steps:
    - uses: actions/checkout@v5
    - name: Setup
      env:
        HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
      run: |
        brew install boost ccache ninja
    - name: Cache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: cmake-macos-ci-${{ github.ref }}
        restore-keys: |
          cmake-macos-ci-${{ github.ref }}
          cmake-macos-ci-refs/heads/master
          cmake-macos-ci-
    - name: Compile
      run: |
        mkdir build
        cd build
        cmake .. -DCMAKE_BUILD_TYPE=Release -DQL_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -GNinja -L
        cat ql/config.hpp
        cmake --build . --verbose
        sudo cmake --install .
    - name: Test
      run: |
        DYLD_LIBRARY_PATH=/usr/local/lib quantlib-test-suite --log_level=message