File: cmake-latest-runners.yml

package info (click to toggle)
quantlib 1.41-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 41,480 kB
  • sloc: cpp: 400,885; makefile: 6,547; python: 214; sh: 150; lisp: 86
file content (117 lines) | stat: -rw-r--r-- 4,390 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
name: CMake build for the latest runners and C++ standards

on:
  schedule:
    # At 02:35 on Monday
    - cron: '35 2 * * 1'
  workflow_dispatch:

jobs:
  cmake-build-and-test:
    strategy:
      fail-fast: false
      matrix:
        settings:
          [
            { os: macos-latest,   cc: clang,    cxx: clang++ },
            { os: ubuntu-latest,  cc: clang,    cxx: clang++ },
            { os: ubuntu-latest,  cc: gcc,      cxx: g++ },
            { os: windows-latest, cc: cl,       cxx: cl }

            ##### This is the full set of currently available runners and compilers. #####
            # { os: macos-14,       cc: clang,    cxx: clang++ },
            # { os: macos-15,       cc: clang,    cxx: clang++ },
            #
            # { os: ubuntu-22.04,   cc: clang-13, cxx: clang++-13 },
            # { os: ubuntu-22.04,   cc: clang-14, cxx: clang++-14 },
            # { os: ubuntu-22.04,   cc: clang-15, cxx: clang++-15 },
            #
            # { os: ubuntu-22.04,   cc: gcc-10,   cxx: g++-10 },
            # { os: ubuntu-22.04,   cc: gcc-11,   cxx: g++-11 },
            # { os: ubuntu-22.04,   cc: gcc-12,   cxx: g++-12 },
            #
            # { os: ubuntu-24.04,   cc: clang-16, cxx: clang++-16 },
            # { os: ubuntu-24.04,   cc: clang-17, cxx: clang++-17 },
            # { os: ubuntu-24.04,   cc: clang-18, cxx: clang++-18 },
            #
            # { os: ubuntu-24.04,   cc: gcc-12,   cxx: g++-12 },
            # { os: ubuntu-24.04,   cc: gcc-13,   cxx: g++-13 },
            # { os: ubuntu-24.04,   cc: gcc-14,   cxx: g++-14 },
            #
            # { os: windows-2022,   cc: cl,       cxx: cl },
            # { os: windows-2025,   cc: cl,       cxx: cl }
          ]
        cxx-standard: [ 17, 20, 23 ]
        cmake-build-type: [ release ]

    runs-on: ${{ matrix.settings.os }}

    steps:
      - uses: actions/checkout@v6

      - name: Determine ccache variant
        shell: bash
        run: |
          echo "CMAKE_CXX_COMPILER_LAUNCHER=${{ ( (runner.os == 'Windows') && 'sccache' ) || 'ccache' }}"   >> $GITHUB_ENV

      - name: Setup CCache
        uses: hendrikmuhs/ccache-action@v1.2
        with:
          key: cmake-latest-${{ inputs.os }}-${{ inputs.cxx }}-${{ inputs.cxx-standard }}
          restore-keys: |
            cmake-latest-${{ inputs.os }}-${{ inputs.cxx }}-${{ inputs.cxx-standard }}
            cmake-latest-${{ inputs.os }}-${{ inputs.cxx }}
            cmake-latest-${{ inputs.os }}
          variant: ${{ env.CMAKE_CXX_COMPILER_LAUNCHER }}

      - name: Setup Linux
        if: runner.os == 'Linux'
        shell: bash
        run: |
          sudo apt-get update
          sudo apt-get install -y ccache ninja-build

          eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
          brew update
          brew install boost

          echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin"   >> $GITHUB_PATH

      - name: Setup macOS
        if: runner.os == 'macOS'
        shell: bash
        run: |
          HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install ninja boost

          echo "CXXFLAGS=-stdlib=libc++"   >> $GITHUB_ENV

      - name: Setup Windows
        if: runner.os == 'Windows'
        shell: pwsh
        run: |
          $BoostUri = "https://archives.boost.io/release/1.90.0/binaries/boost_1_90_0-msvc-14.3-64.exe"
          Start-BitsTransfer -Source $BoostUri -Destination $env:RUNNER_TEMP\boost.exe
          Start-Process -Wait -FilePath "$env:RUNNER_TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$env:RUNNER_TEMP\boost"

          choco install -y ninja

          Write "Boost_DIR=$env:RUNNER_TEMP\boost\lib64-msvc-14.3\cmake\Boost-1.90.0"   >> $env:GITHUB_ENV

      - name: Set up Visual Studio shell on Windows
        if: runner.os == 'Windows'
        uses: ilammy/msvc-dev-cmd@v1
        with:
          arch: x64

      - name: Configure CMake and build
        env:
          CC: ${{ matrix.settings.cc }}
          CXX: ${{ matrix.settings.cxx }}
        run: |
          cmake --version
          cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} -DQL_COMPILE_WARNING_AS_ERROR=ON -L
          cmake --build build --verbose

      - name: Run the test-suite
        run: |
          ./build/test-suite/quantlib-test-suite -l message