add qt_version to CI matrix #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| Core: | |
| name: ${{ matrix.os }} - ${{ matrix.config_name }} - Qt ${{ matrix.qt_version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| config_name: [Widgets, QML] | |
| qt_version: [6.10.1, 6.10.2] | |
| 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" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Qt Environment | |
| uses: ./.github/actions/setup-qt-env | |
| with: | |
| qt_version: ${{ matrix.qt_version }} | |
| - 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 | |
| Python: | |
| name: ${{ matrix.os }} - Qt ${{ matrix.qt_version }} - Python ${{ matrix.python_version }} | |
| needs: Core | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python_version: ['3.10', '3.11', '3.12', '3.13'] | |
| qt_version: [6.10.1, 6.10.2] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Qt Environment | |
| uses: ./.github/actions/setup-qt-env | |
| with: | |
| qt_version: ${{ matrix.qt_version }} | |
| - name: Setup Python Environment | |
| uses: ./.github/actions/setup-python-env | |
| with: | |
| python_version: ${{ matrix.python_version }} | |
| qt_version: ${{ matrix.qt_version }} | |
| - name: Install Bindings | |
| shell: bash | |
| env: | |
| PYTHONIOENCODING: utf-8 | |
| run: pip install . | |
| - name: Run (Linux) | |
| if: runner.os == 'Linux' | |
| run: xvfb-run pytest | |
| - name: Run (Windows) | |
| if: runner.os != 'Linux' | |
| run: pytest |