Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.yml « workflows « .github - github.com/onqtam/doctest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 59957e7e28187dd9a4c9656322aaa98153add16a (plain)
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
name: CI

on:
  push:
    paths-ignore:
      - 'doc/**'
      - 'scripts/**'
      - 'LICENSE.txt'
      - 'README.md'
  pull_request:

env:
  CTEST_OUTPUT_ON_FAILURE: ON
  CTEST_PARALLEL_LEVEL: 2

jobs:
  coverage:
    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
    runs-on: ubuntu-latest
      
    steps:
      - uses: actions/checkout@v2
      
      - name: Install
        run: sudo apt-get install -y ninja-build lcov
      
      - name: Generate
        run: cmake -B build -S . -G Ninja -D CMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage"

      - name: Build
        run: cmake --build build

      - name: Test
        run: ctest --test-dir build --no-tests=error
        
      - name: LCOV
        run: |
          mkdir coverage
          lcov -c -d build/ -o coverage/lcov.info --include "*doctest/parts*"
          
      - name: Codecov
        uses: codecov/codecov-action@v2
        with:
          files: ./coverage/lcov.info
          fail_ci_if_error: true

  ci:
    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
    runs-on: ${{ matrix.os }}

    env:
      CMAKE_GENERATOR: Ninja
      ASAN_OPTIONS: strict_string_checks=true:detect_odr_violation=2:detect_stack_use_after_return=true:check_initialization_order=true:strict_init_order=true
      TSAN_OPTIONS: force_seq_cst_atomics=1

    strategy:
      fail-fast: false
      matrix:
        os: ["windows-2019", "windows-2022"]
        compiler: ["cl", "clang", "clang-cl"]

        include:
          - os: ubuntu-18.04
            compiler: gcc
            version: "4.8"

          - os: ubuntu-18.04
            compiler: gcc
            version: "4.9"

          - os: ubuntu-18.04
            compiler: gcc
            version: "5"

          - os: ubuntu-18.04
            compiler: gcc
            version: "6"

          - os: ubuntu-18.04
            compiler: gcc
            version: "7"

          - os: ubuntu-18.04
            compiler: gcc
            version: "8"

          - os: ubuntu-latest
            compiler: gcc
            version: "9"

          - os: ubuntu-latest
            compiler: gcc
            version: "10"

          - os: ubuntu-latest
            compiler: gcc
            version: "11"

          - os: ubuntu-18.04
            compiler: clang
            version: "3.5"

          - os: ubuntu-18.04
            compiler: clang
            version: "3.6"

          - os: ubuntu-18.04
            compiler: clang
            version: "3.7"

          - os: ubuntu-18.04
            compiler: clang
            version: "3.8"

          - os: ubuntu-18.04
            compiler: clang
            version: "3.9"

          - os: ubuntu-18.04
            compiler: clang
            version: "4.0"

          - os: ubuntu-18.04
            compiler: clang
            version: "5.0"

          - os: ubuntu-18.04
            compiler: clang
            version: "6.0"

          - os: ubuntu-18.04
            compiler: clang
            version: "7"

          - os: ubuntu-18.04
            compiler: clang
            version: "8"

          - os: ubuntu-latest
            compiler: clang
            version: "9"

          - os: ubuntu-latest
            compiler: clang
            version: "10"

          - os: ubuntu-latest
            compiler: clang
            version: "11"

          - os: ubuntu-latest
            compiler: clang
            version: "12"

          - os: ubuntu-latest
            compiler: clang
            version: "13"

          - os: macOS-10.15
            compiler: xcode
            version: "10.3"

          - os: macOS-latest
            compiler: xcode
            version: "11.7"

          - os: macOS-latest
            compiler: xcode
            version: "12.5.1"

          - os: macOS-latest
            compiler: xcode
            version: "13.2.1"

          - os: macOS-latest
            compiler: gcc
            version: "11"

    steps:
      - uses: actions/checkout@v2

      - name: Install (Linux)
        if: runner.os == 'Linux'
        run: |
          # Required for libc6-dbg:i386 and g++-multilib packages which are
          # needed for x86 builds.
          sudo dpkg --add-architecture i386

          # clang-3.7 and earlier are not available in Bionic anymore so we get
          # them from the Xenial repositories instead.
          sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial main"
          sudo add-apt-repository "deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe"

          # clang->=13 is not currently available by default
          if [ "${{ matrix.compiler }}" = "clang" -a ${{ matrix.version }} -ge 13  ]; then
            wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
            sudo add-apt-repository "deb https://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.version }} main"
          fi

          sudo apt-get update

          # libc6-dbg:i386 is required for running valgrind on x86.
          sudo apt-get install -y ninja-build valgrind libc6-dbg:i386

          if [ "${{ matrix.compiler }}" = "gcc" ]; then
            sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
          else
            sudo apt-get install -y clang-${{ matrix.version }} g++-multilib
          fi

      - name: Install (macOS)
        if: runner.os == 'macOS'
        run: |
            brew install ninja
            if [ "${{ matrix.compiler }}" = "xcode" ]; then
              sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
            fi

      - name: Configure x64
        uses: ilammy/msvc-dev-cmd@v1

      - name: Build & Test x64
        run: python3 .github/workflows/build_and_test.py ${{ runner.os }} x64 ${{ matrix.compiler }} ${{ matrix.version }}

      - name: Configure x86
        uses: ilammy/msvc-dev-cmd@v1
        with:
          arch: x86

      # MacOS doesn't support x86 from Xcode 10 onwards.

      - name: Build & Test x86
        if: runner.os == 'Linux' || runner.os == 'Windows' && matrix.compiler != 'clang-cl'
        run: python3 .github/workflows/build_and_test.py ${{ runner.os }} x86 ${{ matrix.compiler }} ${{ matrix.version }}

  ci-min-gw:
    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
    runs-on: windows-latest

    strategy:
      fail-fast: false
      matrix:
        configuration: ["Debug", "Release"]

    steps:
      - uses: actions/checkout@v2

      - name: Set up MinGW
        uses: egor-tensin/setup-mingw@v2

      - name: Generate
        run: cmake -B build -S . -G "MinGW Makefiles" -D CMAKE_BUILD_TYPE=${{ matrix.configuration }}

      - name: Build
        run: cmake --build build

      - name: Test
        run: ctest --test-dir build --no-tests=error

  ci-msvs:
    if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
    runs-on: ${{ matrix.toolset == 'v143' && 'windows-2022' || 'windows-latest' }}

    strategy:
      fail-fast: false
      matrix:
        toolset: ["v140", "v141", "v142", "v143", "ClangCl"]
        architecture: ["Win32", "x64"]
        configuration: ["Debug", "Release"]

    steps:
      - uses: actions/checkout@v2
      
      - name: Generate
        run: cmake -B build -S . -G "${{ matrix.toolset == 'v143' && 'Visual Studio 17 2022' || 'Visual Studio 16 2019' }}" \
            -A ${{ matrix.architecture }} -T ${{ matrix.toolset }}

      - name: Build
        run: cmake --build build --config ${{ matrix.configuration }}

      - name: Test
        run: ctest -C ${{ matrix.configuration }} --test-dir build --no-tests=error