Skip to content

Commit

Permalink
Add CI nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Nov 5, 2023
1 parent 0d1e017 commit 88fa5e9
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# 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: CI

on:
schedule:
- cron: '0 3 * * *'

# TODO remove after green
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-22.04
- windows-2022
- macos-13

config:
- name: ci-python-qt6
qt_version: "6.6.0"
apt_pgks:
- llvm

include:
- os: ubuntu-22.04
config:
name: ci-clang-tidy-qt5
cmake_arg: '-DCMAKE_CXX_CLANG_TIDY=clang-tidy'
qt_version: "5.15"

- os: ubuntu-22.04
config:
name: clazy
cmake_arg: '-DCMAKE_CXX_COMPILER=clang++'
qt_version: "5.15"
apt_pgks:
- clazy

steps:
- name: Install Qt ${{ matrix.config.qt_version }} with options and default aqtversion
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.config.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 (${{ join(matrix.config.apt_pgks, ' ') }})
if: ${{ runner.os == 'Linux' && matrix.config.apt_pgks }}
run: |
sudo apt update -qq
echo ${{ join(matrix.config.apt_pgks, ' ') }} | xargs sudo apt install -y
- uses: actions/checkout@v4
#with:
#ref: '2.0' # schedule.cron do not allow branch setting

- uses: actions/setup-python@v4
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: Make sure MSVC is found when Ninja generator is in use
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1

- name: Hackery due Shiboken hardcoded paths
if: ${{ runner.os == 'Linux' }}
run: |
sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/bin/
sudo cp /usr/bin/g++-10 /opt/rh/gcc-toolset-10/root/usr/bin/c++
sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/
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/
- name: Configure project
run: >
cmake -S . -B ./build ${{ matrix.config.cmake_arg }}
- name: Configure project
run: >
cmake -S . -B ./build -G Ninja
-DCMAKE_BUILD_TYPE=Release
--warn-uninitialized
-Werror=dev
-DKDReports_QT6=${{ startsWith(matrix.config.qt_version, '6.') }}
-DKDReports_PYTHON_BINDINGS=${{ matrix.config.pip_pgks }}
-DPython3_FIND_VIRTUALENV=ONLY
- name: Build Project
run: cmake --build ./build
2 changes: 2 additions & 0 deletions .github/workflows/pip-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
shiboken6-generator == 6.6.0
pyside6 == 6.6.0

0 comments on commit 88fa5e9

Please sign in to comment.