Skip to content

add qml tests

add qml tests #11

Workflow file for this run

name: Tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
Test:
name: ${{ matrix.os }} - ${{ matrix.config_name }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
config_name: [Widgets, QML]
include:
- config_name: "Widgets"
cmake_flags: "-DSIMPLE_MAP_VIEW_BUILD_TESTS=ON"
build_type: "Debug"
- config_name: "QML"
cmake_flags: "-DSIMPLE_MAP_VIEW_BUILD_QML=ON -DSIMPLE_MAP_VIEW_BUILD_TESTS=ON"
build_type: "Debug"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Xvfb (Linux)
if: runner.os == 'Linux'
run: |
sudo apt install -y xvfb
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: 6.10.1
target: desktop
modules: 'qtpositioning'
cached: true
- name: Configure CMake
shell: bash
run: |
mkdir build
cd build
cmake .. ${{ matrix.cmake_flags }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
shell: bash
working-directory: build
run: |
cmake --build . --config ${{ matrix.build_type }}
- name: Run (Linux)
if: runner.os == 'Linux'
working-directory: build
run: xvfb-run ctest --output-on-failure
- name: Run (Windows / macOS)
if: runner.os != 'Linux'
shell: bash
working-directory: build
run: ctest -C ${{ matrix.build_type }} --output-on-failure