|
1 |
| -# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> |
2 |
| -# |
3 |
| -# SPDX-License-Identifier: MIT |
4 |
| - |
5 |
| -name: CI |
6 |
| - |
7 |
| -on: |
8 |
| - push: |
9 |
| - branches: |
10 |
| - - master |
11 |
| - - kdreports-2.2 |
12 |
| - pull_request: |
13 |
| - branches: |
14 |
| - - master |
15 |
| - - kdreports-2.2 |
16 |
| - |
17 |
| -jobs: |
18 |
| - build: |
19 |
| - runs-on: ${{ matrix.os }} |
20 |
| - strategy: |
21 |
| - fail-fast: true |
22 |
| - matrix: |
23 |
| - os: |
24 |
| - - ubuntu-22.04 |
25 |
| - - windows-2022 |
26 |
| - - macos-13 |
27 |
| - |
28 |
| - build_type: |
29 |
| - - Debug |
30 |
| - - Release |
31 |
| - |
32 |
| - config: |
33 |
| - - qt_version: "5.15" |
34 |
| - - qt_version: "6.6.0" |
35 |
| - |
36 |
| - include: |
37 |
| - - os: ubuntu-22.04 |
38 |
| - build_type: Release |
39 |
| - config: |
40 |
| - qt_version: "6.6.0" |
41 |
| - apt_pgks: |
42 |
| - - llvm |
43 |
| - pip_pgks: |
44 |
| - - shiboken6-generator==6.6.0 pyside6==6.6.0 |
45 |
| - |
46 |
| - steps: |
47 |
| - - name: Install Qt with options and default aqtversion |
48 |
| - uses: jurplel/install-qt-action@v3 |
49 |
| - with: |
50 |
| - aqtversion: null # use whatever the default is |
51 |
| - modules: ${{ matrix.config.modules }} |
52 |
| - version: ${{ matrix.config.qt_version }} |
53 |
| - cache: true |
54 |
| - |
55 |
| - - name: Checkout sources |
56 |
| - uses: actions/checkout@v4 |
57 |
| - |
58 |
| - - name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }}) |
59 |
| - if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }} |
60 |
| - run: | |
61 |
| - sudo apt update -qq |
62 |
| - echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y |
63 |
| -
|
64 |
| - - name: Install Python dependencies (${{ join(matrix.config.pip_pgks, ' ') }}) |
65 |
| - if: ${{ matrix.config.pip_pgks }} |
66 |
| - run: echo ${{ join(matrix.config.pip_pgks, ' ') }} | xargs pip install |
67 |
| - |
68 |
| - - name: Hackery due Shiboken hardcoded paths |
69 |
| - if: ${{ matrix.config.pip_pgks }} |
70 |
| - run: | |
71 |
| - sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/bin/ |
72 |
| - sudo cp /usr/bin/g++-10 /opt/rh/gcc-toolset-10/root/usr/bin/c++ |
73 |
| - sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ |
74 |
| - sudo cp /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ |
75 |
| -
|
76 |
| - - name: Install ninja-build tool (must be after Qt due PATH changes) |
77 |
| - uses: turtlesec-no/get-ninja@main |
78 |
| - |
79 |
| - - name: Make sure MSVC is found when Ninja generator is in use |
80 |
| - uses: ilammy/msvc-dev-cmd@v1 |
81 |
| - |
82 |
| - - name: Configure project |
83 |
| - run: > |
84 |
| - cmake -S . -B ./build -G Ninja |
85 |
| - -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} |
86 |
| - --warn-uninitialized |
87 |
| - -Werror=dev |
88 |
| - -DKDReports_QT6=${{ startsWith(matrix.config.qt_version, '6.') }} |
89 |
| - -DKDReports_PYTHON_BINDINGS=${{ matrix.config.pip_pgks }} |
90 |
| - -DPython3_FIND_VIRTUALENV=ONLY |
91 |
| - -DKDReports_TESTS=${{ matrix.build_type == 'Debug' }} |
92 |
| - -DKDReports_EXAMPLES=${{ matrix.build_type == 'Debug' }} |
93 |
| - -DKDReports_DOCS=${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} |
94 |
| -
|
95 |
| - - name: Build Project |
96 |
| - run: cmake --build ./build |
97 |
| - |
98 |
| - - name: Run tests on Linux (offscreen) |
99 |
| - id: ctest_linux |
100 |
| - if: ${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} |
101 |
| - run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure |
102 |
| - env: |
103 |
| - QT_QPA_PLATFORM: offscreen |
104 |
| - |
105 |
| - - name: Run tests on Windown/macOS |
106 |
| - id: ctest_non_linux |
107 |
| - if: ${{ matrix.build_type == 'Debug' && runner.os != 'Linux' }} |
108 |
| - run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure |
109 |
| - |
110 |
| - - name: Read tests log when it fails |
111 |
| - uses: andstor/file-reader-action@v1 |
112 |
| - if: ${{ steps.ctest_non_linux.conclusion == 'failure' || steps.ctest_linux.conclusion == 'failure' }} |
113 |
| - with: |
114 |
| - path: "./build/Testing/Temporary/LastTest.log" |
| 1 | +## SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com> |
| 2 | +## |
| 3 | +## SPDX-License-Identifier: MIT |
| 4 | + |
| 5 | +#name: CI |
| 6 | + |
| 7 | +#on: |
| 8 | + #push: |
| 9 | + #branches: |
| 10 | + #- master |
| 11 | + #- kdreports-2.2 |
| 12 | + #pull_request: |
| 13 | + #branches: |
| 14 | + #- master |
| 15 | + #- kdreports-2.2 |
| 16 | + |
| 17 | +#jobs: |
| 18 | + #build: |
| 19 | + #runs-on: ${{ matrix.os }} |
| 20 | + #strategy: |
| 21 | + #fail-fast: true |
| 22 | + #matrix: |
| 23 | + #os: |
| 24 | + #- ubuntu-22.04 |
| 25 | + #- windows-2022 |
| 26 | + #- macos-13 |
| 27 | + |
| 28 | + #build_type: |
| 29 | + #- Debug |
| 30 | + #- Release |
| 31 | + |
| 32 | + #config: |
| 33 | + #- qt_version: "5.15" |
| 34 | + #- qt_version: "6.6.0" |
| 35 | + |
| 36 | + #include: |
| 37 | + #- os: ubuntu-22.04 |
| 38 | + #build_type: Release |
| 39 | + #config: |
| 40 | + #qt_version: "6.6.0" |
| 41 | + #apt_pgks: |
| 42 | + #- llvm |
| 43 | + #pip_pgks: |
| 44 | + #- shiboken6-generator==6.6.0 pyside6==6.6.0 |
| 45 | + |
| 46 | + #steps: |
| 47 | + #- name: Install Qt with options and default aqtversion |
| 48 | + #uses: jurplel/install-qt-action@v3 |
| 49 | + #with: |
| 50 | + #aqtversion: null # use whatever the default is |
| 51 | + #modules: ${{ matrix.config.modules }} |
| 52 | + #version: ${{ matrix.config.qt_version }} |
| 53 | + #cache: true |
| 54 | + |
| 55 | + #- name: Checkout sources |
| 56 | + #uses: actions/checkout@v4 |
| 57 | + |
| 58 | + #- name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }}) |
| 59 | + #if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }} |
| 60 | + #run: | |
| 61 | + #sudo apt update -qq |
| 62 | + #echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y |
| 63 | + |
| 64 | + #- name: Install Python dependencies (${{ join(matrix.config.pip_pgks, ' ') }}) |
| 65 | + #if: ${{ matrix.config.pip_pgks }} |
| 66 | + #run: echo ${{ join(matrix.config.pip_pgks, ' ') }} | xargs pip install |
| 67 | + |
| 68 | + #- name: Hackery due Shiboken hardcoded paths |
| 69 | + #if: ${{ matrix.config.pip_pgks }} |
| 70 | + #run: | |
| 71 | + #sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/bin/ |
| 72 | + #sudo cp /usr/bin/g++-10 /opt/rh/gcc-toolset-10/root/usr/bin/c++ |
| 73 | + #sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ |
| 74 | + #sudo cp /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ |
| 75 | + |
| 76 | + #- name: Install ninja-build tool (must be after Qt due PATH changes) |
| 77 | + #uses: turtlesec-no/get-ninja@main |
| 78 | + |
| 79 | + #- name: Make sure MSVC is found when Ninja generator is in use |
| 80 | + #uses: ilammy/msvc-dev-cmd@v1 |
| 81 | + |
| 82 | + #- name: Configure project |
| 83 | + #run: > |
| 84 | + #cmake -S . -B ./build -G Ninja |
| 85 | + #-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} |
| 86 | + #--warn-uninitialized |
| 87 | + #-Werror=dev |
| 88 | + #-DKDReports_QT6=${{ startsWith(matrix.config.qt_version, '6.') }} |
| 89 | + #-DKDReports_PYTHON_BINDINGS=${{ matrix.config.pip_pgks }} |
| 90 | + #-DPython3_FIND_VIRTUALENV=ONLY |
| 91 | + #-DKDReports_TESTS=${{ matrix.build_type == 'Debug' }} |
| 92 | + #-DKDReports_EXAMPLES=${{ matrix.build_type == 'Debug' }} |
| 93 | + #-DKDReports_DOCS=${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} |
| 94 | + |
| 95 | + #- name: Build Project |
| 96 | + #run: cmake --build ./build |
| 97 | + |
| 98 | + #- name: Run tests on Linux (offscreen) |
| 99 | + #id: ctest_linux |
| 100 | + #if: ${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }} |
| 101 | + #run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure |
| 102 | + #env: |
| 103 | + #QT_QPA_PLATFORM: offscreen |
| 104 | + |
| 105 | + #- name: Run tests on Windown/macOS |
| 106 | + #id: ctest_non_linux |
| 107 | + #if: ${{ matrix.build_type == 'Debug' && runner.os != 'Linux' }} |
| 108 | + #run: ctest --test-dir ./build -C ${{ matrix.build_type }} --output-on-failure |
| 109 | + |
| 110 | + #- name: Read tests log when it fails |
| 111 | + #uses: andstor/file-reader-action@v1 |
| 112 | + #if: ${{ steps.ctest_non_linux.conclusion == 'failure' || steps.ctest_linux.conclusion == 'failure' }} |
| 113 | + #with: |
| 114 | + #path: "./build/Testing/Temporary/LastTest.log" |
0 commit comments