File: python_clazy_tidy_valgrind.yml

package info (click to toggle)
kddockwidgets 2.4.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,412 kB
  • sloc: cpp: 50,019; ansic: 765; python: 239; xml: 61; makefile: 14; sh: 7
file content (83 lines) | stat: -rw-r--r-- 2,410 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
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

name: python, clang-tidy and valgrind

on:
  workflow_dispatch:
  push:
    branches:
      - main
      - "2.4"
  pull_request:
    branches:
      - main
      - "2.4"

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: true
      matrix:
        os:
          - ubuntu-24.04

        preset:
          - name: ci-python-qt6
            qt_version: "6.6.0"

          - name: ci-clang-tidy-qt6
            qt_version: "6.3.*"

          - name: clazy
            build_preset_arg: "--preset=clazy"
            qt_version: "6.5.0"

          - name: ci-dev-valgrind-qt6
            qt_version: "6.5.*"

    steps:
      - name: Export IS_SELFHOSTED
        run: echo "IS_SELFHOSTED=$IS_SELFHOSTED" >> $GITHUB_ENV

      - name: Install Qt ${{ matrix.preset.qt_version }}
        uses: jurplel/install-qt-action@v4
        if: env.IS_SELFHOSTED != 1
        with:
          version: ${{ matrix.preset.qt_version }}
          cache: true

      - name: Install ninja-build tool (must be after Qt due PATH changes)
        uses: turtlesec-no/get-ninja@main

      - name: Install dependencies on Ubuntu
        if: ${{ runner.os == 'Linux' }}
        run: |
          sudo apt update -qq
          sudo apt install libspdlog-dev lld valgrind clazy llvm -y

      - uses: actions/checkout@v4

      - uses: actions/setup-python@v5
        with:
          cache: "pip"
          cache-dependency-path: ".github/workflows/pip-requirements.txt"
          python-version: "3.9"

      - run: pip3.9 install -r .github/workflows/pip-requirements.txt

      - name: Configure project
        run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }}

      - name: Build Project ${{ matrix.preset.build_preset_arg }}
        if: ${{ matrix.os != 'windows-2022' || matrix.preset.name != 'ci-python-qt6' }}
        run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }}

      - name: Run tests on Linux (offscreen)
        if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }}
        run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure
        env:
          QT_QPA_PLATFORM: offscreen
          QT_QUICK_BACKEND: software