Skip to content

Commit 2ace08d

Browse files
committed
Add CI nightly
1 parent 0d1e017 commit 2ace08d

File tree

3 files changed

+218
-114
lines changed

3 files changed

+218
-114
lines changed

.github/workflows/build.yml

Lines changed: 114 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,114 @@
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"

.github/workflows/nightly.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
2+
#
3+
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
4+
5+
name: CI
6+
7+
on:
8+
schedule:
9+
- cron: '0 3 * * *'
10+
11+
# TODO remove after green
12+
push:
13+
branches:
14+
- master
15+
pull_request:
16+
branches:
17+
- master
18+
19+
jobs:
20+
build:
21+
runs-on: ${{ matrix.os }}
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
os:
26+
- ubuntu-22.04
27+
- windows-2022
28+
- macos-13
29+
30+
config:
31+
- name: ci-python-qt6
32+
qt_version: "6.6.0"
33+
apt_pgks:
34+
- llvm
35+
36+
include:
37+
- os: ubuntu-22.04
38+
config:
39+
name: ci-clang-tidy-qt5
40+
cmake_arg: '-DCMAKE_CXX_CLANG_TIDY=clang-tidy'
41+
qt_version: "5.15"
42+
43+
- os: ubuntu-22.04
44+
config:
45+
name: clazy
46+
cmake_arg: '-DCMAKE_CXX_COMPILER=clang++'
47+
qt_version: "5.15"
48+
apt_pgks:
49+
- clazy
50+
51+
steps:
52+
- name: Install Qt ${{ matrix.config.qt_version }} with options and default aqtversion
53+
uses: jurplel/install-qt-action@v3
54+
with:
55+
version: ${{ matrix.config.qt_version }}
56+
cache: true
57+
58+
- name: Install ninja-build tool (must be after Qt due PATH changes)
59+
uses: turtlesec-no/get-ninja@main
60+
61+
- name: Install dependencies on Ubuntu (${{ join(matrix.config.apt_pgks, ' ') }})
62+
if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }}
63+
run: |
64+
sudo apt update -qq
65+
echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y
66+
67+
- uses: actions/checkout@v4
68+
#with:
69+
#ref: '2.0' # schedule.cron do not allow branch setting
70+
71+
- uses: actions/setup-python@v4
72+
with:
73+
cache: 'pip'
74+
cache-dependency-path: '.github/workflows/pip-requirements.txt'
75+
python-version: '3.9'
76+
77+
- run: pip3.9 install -r .github/workflows/pip-requirements.txt
78+
79+
- name: Make sure MSVC is found when Ninja generator is in use
80+
if: ${{ runner.os == 'Windows' }}
81+
uses: ilammy/msvc-dev-cmd@v1
82+
83+
- name: Hackery due Shiboken hardcoded paths
84+
if: ${{ runner.os == 'Linux' }}
85+
run: |
86+
sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/bin/
87+
sudo cp /usr/bin/g++-10 /opt/rh/gcc-toolset-10/root/usr/bin/c++
88+
sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/
89+
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/
90+
91+
- name: Configure project
92+
run: >
93+
cmake -S . -B ./build -G Ninja ${{ matrix.config.cmake_arg }}
94+
-DCMAKE_BUILD_TYPE=Release
95+
--warn-uninitialized
96+
-Werror=dev
97+
-DKDReports_QT6=${{ startsWith(matrix.config.qt_version, '6.') }}
98+
-DKDReports_PYTHON_BINDINGS=${{ matrix.config.pip_pgks }}
99+
-DPython3_FIND_VIRTUALENV=ONLY
100+
101+
- name: Build Project
102+
run: cmake --build ./build
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shiboken6-generator == 6.6.0
2+
pyside6 == 6.6.0

0 commit comments

Comments
 (0)