Skip to content

Commit

Permalink
CI: Dedup from KDAB CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Nov 15, 2023
1 parent 35312fb commit 96e5ea1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
30 changes: 13 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ jobs:
build_type:
- Debug
- Release
qt:
- version: "5.15.2"
requested: "5.15"
arch: win64_mingw81
- version: "6.4.2"
requested: "6.4.*"
modules: qtscxml
arch: win64_mingw
config:
- qt_version: "5.15"
qt_arch: win64_mingw81
- qt_version: "6.4.*"
qt_modules: qtscxml
qt_arch: win64_mingw

steps:
- name: Install Dependencies on Linux
Expand All @@ -54,18 +52,18 @@ jobs:
uses: jurplel/install-qt-action@v3
with:
aqtversion: null # use whatever the default is
modules: ${{ matrix.qt.modules }}
version: ${{ matrix.qt.requested }}
modules: ${{ matrix.config.qt_modules }}
version: ${{ matrix.config.qt_version }}
cache: true

- name: Install Qt with options and default aqtversion (Windows)
if: ${{ runner.os == 'Windows' }}
uses: jurplel/install-qt-action@v3
with:
aqtversion: null # use whatever the default is
modules: ${{ matrix.qt.modules }}
version: ${{ matrix.qt.requested }}
arch: ${{ matrix.qt.arch }} # MinGW is required otherwise we get link errors with graphviz
modules: ${{ matrix.config.qt_modules }}
version: ${{ matrix.config.qt_version }}
arch: ${{ matrix.config.qt_arch }} # MinGW is required otherwise we get link errors with graphviz
cache: true

- name: Add Graphviz libraries to Windows PATH
Expand All @@ -82,15 +80,13 @@ jobs:
- name: Fetch Git submodule
run: git submodule update --init --recursive

- name: Create build directory
run: mkdir build

- name: Configure project
run: >
cmake -S . -B ./build -G Ninja
--warn-uninitialized -Werror=dev
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_PREFIX_PATH='C:\Program Files\Graphviz'
-DBUILD_QT6=${{ startsWith(matrix.qt.version, '6.') }}
-DBUILD_QT6=${{ startsWith(matrix.config.qt_version, '6.') }}
-DBUILD_TESTS=${{ matrix.build_type == 'Debug' }}
-DBUILD_EXAMPLES=ON
-DBUILD_DOCS=${{ matrix.build_type == 'Debug' && runner.os == 'Linux' }}
Expand Down
4 changes: 4 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#

# qhelpgenerator
if(NOT DEFINED QT_INSTALL_BINS)
# silent --warn-uninitialized
set(QT_INSTALL_BINS "")
endif()
find_program(QHELPGEN_EXECUTABLE qhelpgenerator HINTS ${QT_INSTALL_BINS})

if(QHELPGEN_EXECUTABLE)
Expand Down
12 changes: 8 additions & 4 deletions src/core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ endif()

ecm_add_test(test_scxmlimport.cpp LINK_LIBRARIES kdsme_testhelper)

ecm_add_test(
test_scxmlexport.cpp LINK_LIBRARIES Qt${Qt_VERSION_MAJOR}::Test ${KDSME_TESTHELPER_EXTRA_LIBS}
kdstatemachineeditor_core
)
if(DEFINED KDSME_TESTHELPER_EXTRA_LIBS)
ecm_add_test(
test_scxmlexport.cpp LINK_LIBRARIES Qt${Qt_VERSION_MAJOR}::Test ${KDSME_TESTHELPER_EXTRA_LIBS}
kdstatemachineeditor_core
)
else()
ecm_add_test(test_scxmlexport.cpp LINK_LIBRARIES Qt${Qt_VERSION_MAJOR}::Test kdstatemachineeditor_core)
endif()

ecm_add_test(test_statemachine.cpp LINK_LIBRARIES kdsme_testhelper)

Expand Down

0 comments on commit 96e5ea1

Please sign in to comment.