mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Extend the CI to test the cpack generated package on Linux
This builds all the examples against the package.
This commit is contained in:
parent
a8bc254dd3
commit
f04dba363b
3 changed files with 71 additions and 14 deletions
48
.github/workflows/ci.yaml
vendored
48
.github/workflows/ci.yaml
vendored
|
@ -243,6 +243,54 @@ jobs:
|
|||
- name: ctest
|
||||
working-directory: ${{ runner.workspace }}/cppbuild
|
||||
run: ctest --verbose
|
||||
- name: cpack
|
||||
working-directory: ${{ runner.workspace }}/cppbuild
|
||||
run: cmake --build . --config Debug --target package
|
||||
- name: "Create C++ packages artefact"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: cpp_bin-${{ matrix.os }}
|
||||
path: ${{ runner.workspace }}/cppbuild/SixtyFPS-cpp-*
|
||||
|
||||
cpp_package_test:
|
||||
needs: [cpp_cmake]
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
DYLD_FRAMEWORK_PATH: /Users/runner/work/sixtyfps/Qt/6.2.1/clang_64/lib
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
CARGO_INCREMENTAL: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install Linux Dependencies
|
||||
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
|
||||
- name: Cache Qt
|
||||
id: cache-qt
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/work/sixtyfps/Qt
|
||||
key: ${{ runner.os }}-${{ github.job }}-cpp-qt
|
||||
- name: Install Qt (Ubuntu)
|
||||
uses: jurplel/install-qt-action@v2
|
||||
with:
|
||||
version: 5.15.2
|
||||
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
||||
- uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: cpp_bin-ubuntu-20.04
|
||||
path: cpp-package
|
||||
- name: unpack package
|
||||
run: |
|
||||
mkdir package
|
||||
tar xvf cpp-package/SixtyFPS-cpp-*.tar.gz -C package --strip-components=1
|
||||
echo "CMAKE_PREFIX_PATH=`pwd`/package" >> $GITHUB_ENV
|
||||
- name: Build examples
|
||||
uses: lukka/run-cmake@v3.4
|
||||
with:
|
||||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
|
||||
cmakeListsTxtPath: examples/CMakeLists.txt
|
||||
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=Debug -DSIXTYFPS_FEATURE_INTERPRETER=1 -DSIXTYFPS_FEATURE_BACKEND_QT=1'
|
||||
buildDirectory: ${{ runner.workspace }}/examples/build
|
||||
buildWithCMakeArgs: '--config Debug'
|
||||
|
||||
docs:
|
||||
uses: sixtyfpsui/sixtyfps/.github/workflows/build_docs.yaml@master
|
||||
|
|
|
@ -25,20 +25,7 @@ if(SIXTYFPS_BUILD_EXAMPLES)
|
|||
if (WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
add_subdirectory(examples/printerdemo/cpp/)
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER)
|
||||
add_subdirectory(examples/printerdemo/cpp_interpreted/)
|
||||
endif()
|
||||
add_subdirectory(examples/printerdemo_old/cpp/)
|
||||
add_subdirectory(examples/todo/cpp/)
|
||||
add_subdirectory(examples/gallery/)
|
||||
add_subdirectory(examples/memory/)
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER AND SIXTYFPS_FEATURE_BACKEND_QT)
|
||||
add_subdirectory(examples/qt_viewer/)
|
||||
endif()
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER)
|
||||
add_subdirectory(examples/iot-dashboard/)
|
||||
endif()
|
||||
add_subdirectory(examples)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(docs/tutorial/cpp/src/)
|
||||
endif()
|
||||
|
|
22
examples/CMakeLists.txt
Normal file
22
examples/CMakeLists.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Copyright © SixtyFPS GmbH <info@sixtyfps.io>
|
||||
# SPDX-License-Identifier: (GPL-3.0-only OR LicenseRef-SixtyFPS-commercial)
|
||||
|
||||
if (NOT TARGET SixtyFPS::SixtyFPS)
|
||||
find_package(SixtyFPS REQUIRED)
|
||||
include(FetchContent)
|
||||
endif()
|
||||
|
||||
add_subdirectory(printerdemo/cpp/)
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER)
|
||||
add_subdirectory(printerdemo/cpp_interpreted/)
|
||||
endif()
|
||||
add_subdirectory(printerdemo_old/cpp/)
|
||||
add_subdirectory(todo/cpp/)
|
||||
add_subdirectory(gallery/)
|
||||
add_subdirectory(memory/)
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER AND SIXTYFPS_FEATURE_BACKEND_QT)
|
||||
add_subdirectory(qt_viewer/)
|
||||
endif()
|
||||
if (SIXTYFPS_FEATURE_INTERPRETER)
|
||||
add_subdirectory(iot-dashboard/)
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue