Skip to content

Commit

Permalink
CI fixed ( kudos to Rick )
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Apr 4, 2023
1 parent cf3cb40 commit b21b42a
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 64 deletions.
140 changes: 77 additions & 63 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ jobs:
generators: "Visual Studio 17 2022",
cmake:
{
qtversion: "6.2.4",
qtversion: "6.5.0",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/msvc2019_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.2.4/msvc2019_64",
qtdirvalue: "../Qt/6.5.0/msvc2019_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.5.0/msvc2019_64",
},
screenshot_filename: "windows-latest-msvc-qt-6-2-4.jpg",
screenshot_filename: "windows-latest-msvc-qt-6.5.0.jpg",
}
- {
name: "Windows 2019 MSVC Qt5",
Expand Down Expand Up @@ -89,12 +89,12 @@ jobs:
generators: "Visual Studio 16 2019",
cmake:
{
qtversion: "6.2.4",
qtversion: "6.5.0",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/msvc2019_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.2.4/msvc2019_64",
qtdirvalue: "../Qt/6.5.0/msvc2019_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.5.0/msvc2019_64",
},
screenshot_filename: "windows-2019-msvc-qt-6-2-4.jpg",
screenshot_filename: "windows-2019-msvc-qt-6.5.0.jpg",
}
- {
name: "Ubuntu Latest GCC Qt5",
Expand Down Expand Up @@ -127,12 +127,12 @@ jobs:
env: { DISPLAY: ":1" },
cmake:
{
qtversion: "6.2.4",
qtversion: "6.5.0",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/gcc_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.2.4/gcc_64",
qtdirvalue: "../Qt/6.5.0/gcc_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.5.0/gcc_64",
},
screenshot_filename: "ubuntu-latest-gcc-qt-6-2-4.jpg",
screenshot_filename: "ubuntu-latest-gcc-qt-6.5.0.jpg",
}
- {
name: "Ubuntu GCC 9 Qt5",
Expand Down Expand Up @@ -165,12 +165,12 @@ jobs:
env: { DISPLAY: ":1" },
cmake:
{
qtversion: "6.2.4",
qtversion: "6.5.0",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/gcc_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.2.4/gcc_64",
qtdirvalue: "../Qt/6.5.0/gcc_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.5.0/gcc_64",
},
screenshot_filename: "ubuntu-latest-gcc-9-qt-6-2-4.jpg",
screenshot_filename: "ubuntu-latest-gcc-9-qt-6.5.0.jpg",
}
- {
name: "macOS Latest Clang Qt5",
Expand Down Expand Up @@ -201,12 +201,12 @@ jobs:
generators: "Ninja",
cmake:
{
qtversion: "6.2.4",
qtversion: "6.5.0",
qtdirkey: "Qt6_DIR",
qtdirvalue: "../Qt/6.2.4/clang_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.2.4/clang_64",
qtdirvalue: "../Qt/6.5.0/clang_64/lib/cmake/Qt6",
qtprefixpath: "../Qt/6.5.0/clang_64",
},
screenshot_filename: "macos-latest-clang-qt-6-2-4.jpg",
screenshot_filename: "macos-latest-clang-qt-6.5.0.jpg",
}

steps:
Expand Down Expand Up @@ -281,8 +281,12 @@ jobs:
cmake --version
- name: Install needed xkbcommon symlink
if: startsWith(matrix.config.name, 'Ubuntu') && endsWith(matrix.config.name, 'Qt6')
run: sudo apt-get install libxkbcommon-dev -y
if: startsWith(matrix.config.name, 'Ubuntu')
run: |
sudo apt-get install libxkbcommon-dev -y
sudo apt-get install libxkbcommon-x11-0 -y
sudo apt-get install libxcb-cursor-dev -y
sudo apt-get install x11-xserver-utils -y
- name: Install hunspell for Ubuntu
if: false && startsWith(matrix.config.name, 'Ubuntu')
Expand All @@ -299,21 +303,21 @@ jobs:
run: |
sudo apt-get install -y imagemagick
- name: Cache Qt5
if: endsWith(matrix.config.name, 'Qt5')
id: cache-qt-5-15
uses: actions/cache@v1 # not v2!
with:
path: ../Qt/5.15.2
key: ${{ runner.os }}-QtCache-Qt5

- name: Cache Qt6
if: endsWith(matrix.config.name, 'Qt6')
id: cache-qt-6-2
uses: actions/cache@v1 # not v2!
with:
path: ../Qt/6.2.4
key: ${{ runner.os }}-QtCache-Qt6
#- name: Cache Qt5
# if: endsWith(matrix.config.name, 'Qt5')
# id: cache-qt-5-15
# uses: actions/cache@v1 # not v2!
# with:
# path: ../Qt/5.15.2
# key: ${{ runner.os }}-QtCache-Qt5
#
#- name: Cache Qt6
# if: endsWith(matrix.config.name, 'Qt6')
# id: cache-qt-6-2
# uses: actions/cache@v1 # not v2!
# with:
# path: ../Qt/6.5.0
# key: ${{ runner.os }}-QtCache-Qt6

- name: Install Qt5
if: endsWith(matrix.config.name, 'Qt5')
Expand All @@ -333,7 +337,7 @@ jobs:
if: endsWith(matrix.config.name, 'Qt6')
uses: jurplel/install-qt-action@v3
with:
version: "6.2.4"
version: "6.5.0"
target: "desktop"
install-deps: "true"
modules: "qtwebengine"
Expand Down Expand Up @@ -371,35 +375,45 @@ jobs:

- name: Smoke test ( QSkinny ) on MacOS
if: startsWith(matrix.config.name, 'macOS')
env:
QT_DEBUG_PLUGINS: "1"
run: |
echo "starting iotdashboard"
DYLD_LIBRARY_PATH=./qskinny_install/lib:./qskinny_install/plugins/skins ./qskinny_build/examples/iotdashboard/iotdashboard.app/Contents/MacOS/iotdashboard -qwindowgeometry 1024x600+75+100 &
DYLD_LIBRARY_PATH=./qskinny_install/lib:./qskinny_install/plugins/skins ./qskinny_build/examples/bin/iotdashboard.app/Contents/MacOS/iotdashboard -qwindowgeometry 1024x600+75+100 --screenshot ${{ matrix.config.screenshot_filename }} &
sleep 10
# TODO remove 'qskinny_build\skins\material3\Release' when skin install is fixed
- name: Smoke Test ( QSkinny ) on Windows
if: startsWith(matrix.config.name, 'Windows')
env:
QT_DEBUG_PLUGINS: "1"
run: |
$Env:PATH += ";qskinny_install/lib"
$Env:PATH += ";qskinny_install/plugins/skins"
echo "starting iotdashboard"
Start-Process qskinny_build\examples\iotdashboard\Release\iotdashboard.exe -ArgumentList "-qwindowgeometry 1024x600+0+0"
Start-Sleep -s 10
$env:Path += ";./qskinny_install/bin;./qskinny_install/lib;./qskinny_install/plugins/skins;./qskinny_build/skins/material3/Release;./qskinny_build/skins/squiek/Release"
echo "starting iotdashboard"
Start-Process qskinny_build\examples\bin\Release\iotdashboard.exe -ArgumentList "-qwindowgeometry 1024x600+0+0 --screenshot ${{ matrix.config.screenshot_filename }}"
Start-Sleep -Seconds 10
- name: Smoke test ( QSkinny ) on Ubuntu
if: startsWith(matrix.config.name, 'Ubuntu')
env:
DISPLAY: ":1"
QT_DEBUG_PLUGINS: "1"
run: |
echo starting Xvfb
Xvfb :1 &
sleep 10
echo starting iotdashboard
./qskinny_build/examples/iotdashboard/iotdashboard &
./qskinny_build/examples/bin/iotdashboard --screenshot ${{ matrix.config.screenshot_filename }} &
sleep 10
- uses: OrbitalOwen/[email protected]
- uses: actions/upload-artifact@v3
with:
file-name: ${{ matrix.config.screenshot_filename }}
name: ${{ matrix.config.screenshot_filename }}
path: ${{ matrix.config.screenshot_filename }}

#- uses: OrbitalOwen/[email protected]
# with:
# file-name: ${{ matrix.config.screenshot_filename }}

- name: Smoke Test Cleanup ( QSkinny ) on Windows
if: startsWith(matrix.config.name, 'Windows')
Expand All @@ -417,22 +431,22 @@ jobs:
killall iotdashboard
killall Xvfb
- name: Configure ( CMake Integration Test )
shell: bash
run: |
mkdir qskinny_build_test
cmake \
-S qskinny_source/examples/iotdashboard_smoketest \
-B qskinny_build_test \
-G "${{ matrix.config.generators }}" \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \
-D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" \
-DQSkinny_DIR:PATH=$GITHUB_WORKSPACE/qskinny_install/lib/cmake/QSkinny
- name: Build ( CMake Integration Test )
shell: bash
run: cmake --build qskinny_build_test --config ${{ matrix.config.build_type }}
#- name: Configure ( CMake Integration Test )
# shell: bash
# run: |
# mkdir qskinny_build_test
# cmake \
# -S qskinny_source/examples/iotdashboard_smoketest \
# -B qskinny_build_test \
# -G "${{ matrix.config.generators }}" \
# -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
# -DCMAKE_PREFIX_PATH:PATH="${{ matrix.config.cmake.qtprefixpath }}" \
# -D${{ matrix.config.cmake.qtdirkey }}:PATH="${{ matrix.config.cmake.qtdirvalue }}" \
# -DQSkinny_DIR:PATH=$GITHUB_WORKSPACE/qskinny_install/lib/cmake/QSkinny
#
#- name: Build ( CMake Integration Test )
# shell: bash
# run: cmake --build qskinny_build_test --config ${{ matrix.config.build_type }}

# - name: Pack
# shell: bash
Expand Down
12 changes: 12 additions & 0 deletions examples/iotdashboard/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <QskObjectCounter.h>

#include <QGuiApplication>
#include <QTimer>

namespace
{
Expand Down Expand Up @@ -86,6 +87,17 @@ int main( int argc, char* argv[] )
MainWindow window;
window.show();

for( int i = 1; i < argc; i++ )
{
if( argv[i] == QStringLiteral("--screenshot") && i + 1 < argc )
{
QTimer::singleShot( 500, &window, [&app, &window, filename = QString(argv[i + 1])]()
{ auto image = window.grabWindow(); image.save(filename); } );

break;
}
}

return app.exec();
}

Expand Down
4 changes: 3 additions & 1 deletion tools/svg2qvg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ if(BUILD_SVG2QVG_STANDALONE)

target_compile_definitions(${target} PRIVATE QSK_STANDALONE)
target_link_libraries(${target} PRIVATE Qt::Gui Qt::GuiPrivate)
else()
target_link_libraries(${target} PRIVATE qskinny)
endif()

target_link_libraries(${target} PRIVATE qskinny Qt::Svg)
target_link_libraries(${target} PRIVATE Qt::Svg)

set_target_properties(${target} PROPERTIES FOLDER tools)

Expand Down

0 comments on commit b21b42a

Please sign in to comment.