GitHub actions add Python bindings to macos and windows #37
Workflow file for this run
This file contains 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
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]> | |
# | |
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only | |
name: CI | |
on: | |
push: | |
branches: | |
- 2.0 | |
pull_request: | |
branches: | |
- 2.0 | |
jobs: | |
#create-virtualenv: | |
#runs-on: ${{ matrix.os }} | |
#steps: | |
#- uses: actions/checkout@v4 | |
#- uses: actions/setup-python@v4 | |
#with: | |
#python-version: '3.10' | |
#- uses: syphar/restore-virtualenv@v1 | |
#id: cache-virtualenv | |
#- uses: syphar/restore-pip-download-cache@v1 | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
#- run: pip3.10 install shiboken6-generator pyside6 | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
build: | |
#needs: create-virtualenv | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- windows-2022 | |
- macos-13 | |
include: | |
#- os: macos-13 | |
- preset: | |
name: ci-python-qt6 | |
qt_version: "6.6.0" | |
detect_leaks: 0 | |
steps: | |
#- name: Install Qt ${{ matrix.preset.qt_version }} with options and default aqtversion | |
#uses: jurplel/install-qt-action@v3 | |
#with: | |
#version: ${{ matrix.preset.qt_version }} | |
#cache: true | |
#- name: Install ninja-build tool (must be after Qt due PATH changes) | |
#uses: turtlesec-no/get-ninja@main | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
cache: 'pip' | |
cache-dependency-path: '.github/workflows/pip-requirements.txt' | |
python-version: '3.9' | |
#- uses: syphar/restore-virtualenv@v1 | |
#id: cache-virtualenv | |
#with: | |
#requirement_files: .github/workflows/pip-requirements.txt | |
#- uses: syphar/restore-pip-download-cache@v1 | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
#with: | |
#requirement_files: .github/workflows/pip-requirements.txt | |
- run: pip3.9 install -r .github/workflows/pip-requirements.txt | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
#- name: Install dependencies on macOS | |
#run: | | |
#sudo brew install llvm | |
#- name: Install Python dependencies (macOS pip3.12) | |
#if: ${{ runner.os == 'macOS' }} | |
#run: pip3.10 install shiboken6-generator pyside6 | |
- name: List Python dependencies | |
run: pip3.9 list | |
#- name: Hackery due Shiboken hardcoded paths | |
#run: | | |
#sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/bin/ | |
#sudo cp /usr/bin/g++-10 /opt/rh/gcc-toolset-10/root/usr/bin/c++ | |
#sudo mkdir -p /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ | |
#sudo cp /usr/lib/gcc/x86_64-linux-gnu/10/cc1plus /opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-linux-gnu/10/ | |
- name: Configure project | |
#run: cmake -S . -B ./build-${{ matrix.preset.name }} --preset ${{ matrix.preset.name }} -DPython3_ROOT_DIR=/Users/runner/hostedtoolcache/Python/3.9.18 | |
run: cmake -S . -B ./build-${{ matrix.preset.name }} | |
- name: Build Project ${{ matrix.preset.build_preset_arg }} | |
run: cmake --build ./build-${{ matrix.preset.name }} ${{ matrix.preset.build_preset_arg }} | |
#- name: Run tests on Linux (offscreen) | |
#if: ${{ startsWith(matrix.preset.name, 'ci-dev-') && runner.os == 'Linux' }} | |
#run: ctest --test-dir ./build-${{ matrix.preset.name }} --output-on-failure | |
#env: | |
#QT_QPA_PLATFORM: offscreen | |
#QT_QUICK_BACKEND: software | |
#LSAN_OPTIONS: detect_leaks=${{ matrix.preset.detect_leaks }} | |
- name: Read tests log when it fails | |
uses: andstor/file-reader-action@v1 | |
if: ${{ failure() && startsWith(matrix.preset.name, 'ci-dev-') }} | |
with: | |
path: "./build-${{ matrix.preset.name }}/Testing/Temporary/LastTest.log" |