File: ci.yml

package info (click to toggle)
robin-map 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 440 kB
  • sloc: cpp: 3,637; makefile: 10
file content (120 lines) | stat: -rw-r--r-- 4,191 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
name: CI

on: [push, pull_request, release]

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        config:
        - {
            name: linux-x64-gcc,
            os: ubuntu-latest,
            cxx: g++,
            cmake-build-type: Release
          }
        - {
            name: linux-x64-gcc-no-exceptions,
            os: ubuntu-latest,
            cxx: g++,
            cxx-flags: -fno-exceptions,
            cmake-build-type: Release
          }
        - {
            name: linux-x64-clang,
            os: ubuntu-latest,
            cxx: clang++,
            cmake-build-type: Release
          }
        - {
            name: macos-x64-gcc,
            os:  macos-latest,
            cxx: g++,
            cmake-build-type: Release
          }
        - {
            name: macos-x64-clang,
            os:  macos-latest,
            cxx: clang++,
            cmake-build-type: Release
          }
        - {
            name: linux-x64-clang-sanitize,
            os: ubuntu-latest,
            cxx: clang++,
            cxx-flags: "-fsanitize=address,undefined",
            cmake-build-type: Release
          }
        - {
            name: linux-x64-gcc-coverage,
            os: ubuntu-latest,
            cxx: g++,
            cxx-flags: --coverage,
            gcov-tool: gcov,
            cmake-build-type: Debug
          }
        - {
            name: windows-x64-vs-2025,
            os: windows-2025,
            cmake-build-type: Release,
            cmake-generator: Visual Studio 17 2022,
            cmake-platform: x64,
            vcpkg-triplet: x64-windows-static-md
          }
        - {
            name: windows-x86-vs-2025,
            os: windows-2025,
            cmake-build-type: Release,
            cmake-generator: Visual Studio 17 2022,
            cmake-platform: Win32,
            vcpkg-triplet: x86-windows-static-md
          }
    name: ${{matrix.config.name}}
    runs-on: ${{matrix.config.os}}
    steps:
    - uses: actions/checkout@v2

    # Windows
    - name: Install boost (Windows)
      run: vcpkg install boost-test:${{matrix.config.vcpkg-triplet}}
      if: runner.os == 'Windows'

    - name: Configure CMake (Windows)
      run: cmake -G "${{matrix.config.cmake-generator}}" -A ${{matrix.config.cmake-platform}} -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{matrix.config.vcpkg-triplet}} -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
      if: runner.os == 'Windows'

    - name: Build (Windows)
      run: cmake --build ${{github.workspace}}/build --config ${{matrix.config.cmake-build-type}} --verbose
      if: runner.os == 'Windows'

    - name: Test (Windows)
      run: ${{github.workspace}}/build/${{matrix.config.cmake-build-type}}/tsl_robin_map_tests.exe
      if: runner.os == 'Windows'

    # Linux or macOS
    - name: Install boost (Linux or macOS)
      run: vcpkg install boost-test
      if: runner.os == 'Linux' || runner.os == 'macOS'

    - name: Configure CMake (Linux or macOS)
      run: cmake -DCMAKE_BUILD_TYPE=${{matrix.config.cmake-build-type}} -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" -S ${{github.workspace}}/tests -B ${{github.workspace}}/build
      env:
        CXX: ${{matrix.config.cxx}}
        CXXFLAGS: ${{matrix.config.cxx-flags}}
      if: runner.os == 'Linux' || runner.os == 'macOS'

    - name: Build (Linux or macOS)
      run: cmake --build ${{github.workspace}}/build --verbose
      if: runner.os == 'Linux' || runner.os == 'macOS'

    - name: Test (Linux or macOS)
      run: ${{github.workspace}}/build/tsl_robin_map_tests
      if: runner.os == 'Linux' || runner.os == 'macOS'

    - name: Coverage
      run: |
        sudo apt-get install -y lcov
        lcov -c -b ${{github.workspace}}/include -d ${{github.workspace}}/build -o ${{github.workspace}}/coverage.info --no-external --gcov-tool ${{matrix.config.gcov-tool}}
        bash <(curl -s https://codecov.io/bash) -f ${{github.workspace}}/coverage.info
      if: ${{matrix.config.name == 'linux-x64-gcc-coverage'}}