Skip to content

Setup CI with Github Actions #9

Setup CI with Github Actions

Setup CI with Github Actions #9

Workflow file for this run

# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: MIT
name: knut tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
# Note: Once we're able to access photonwidgets and mfc-utils, this can simply be replaced by
# setting
# with:
# submodules: recursive
# on the "Checkout sources" step
- name: Checkout submodules
run: |
git submodule update --init --force --depth=1 --recursive -- '3rdparty/extra-cmake-modules'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/kdalgorithms'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/ksyntaxhighlighting'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/nlohmann-json'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/pugixml'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/spdlog'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/tree-sitter'
git submodule update --init --force --depth=1 --recursive -- '3rdparty/tree-sitter-cpp'
# git submodule update --init --force --depth=1 --recursive -- '3rdparty/photonwidgets'
# git submodule update --init --force --depth=1 --recursive -- '3rdparty/mfc-utils'
- name: Install ninja-build tool
uses: aseprite/get-ninja@main
- name: Install Qt 6
uses: jurplel/install-qt-action@v4
with:
version: 6.5.* # 6.5 is the current LTS (as of 2024-06-06)
- name: Make sure MSVC is found when Ninja generator is in use
uses: ilammy/msvc-dev-cmd@v1
- name: Configure project
run: cmake --preset=ci
- name: Build Project
run: cmake --build --preset=ci
- name: Run tests
run: ctest --preset=ci