doc(readme): add link to deepwiki #287
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: Build | |
on: | |
push: | |
branches: [ main ] | |
tags: | |
- "*.*.*" | |
pull_request: | |
branches: [ main ] | |
jobs: | |
debian: | |
name: Debian Trixie | |
runs-on: ubuntu-24.04 | |
container: docker.io/library/debian:trixie | |
steps: | |
- name: Install Dependencies Git | |
run: | | |
apt-get update | |
apt-get install -y sudo git | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Add Debian experiment repository | |
run: echo "deb http://deb.debian.org/debian experimental main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/experimental.list | |
- name: Update repository | |
run: apt-get update -y | |
- name: Install the basic dev packages | |
run: apt-get install -y equivs curl git devscripts lintian build-essential automake autotools-dev cmake g++ | |
- name: Install build dependencies | |
run: mk-build-deps -i -t "apt-get --yes" -r | |
- name: Build Package | |
run: dpkg-buildpackage -b -uc -us -j$(nproc) | |
python-package: | |
name: Python Package Build | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
os: [ubuntu-24.04, windows-latest, macos-latest] | |
qt-version: ["6.8.*"] | |
include: | |
- os: ubuntu-24.04 | |
qt-arch: 'linux_gcc_64' | |
- os: windows-latest | |
qt-arch: 'win64_msvc2022_64' | |
- os: macos-latest | |
qt-arch: 'clang_64' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Setup Ninja | |
uses: kobiton/action-setup-ninja@f2ba2a8c0a6564883bafc14bee416b154a85a659 | |
with: | |
# ninja version to download. Default: 1.10.0 | |
version: 1.11.1 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Qt on ${{ matrix.os }} | |
uses: jurplel/install-qt-action@v4 | |
if: matrix.os != 'ubuntu-24.04' | |
with: | |
version: ${{ matrix.qt-version }} | |
target: 'desktop' | |
arch: ${{ matrix.qt-arch }} | |
dir: '${{ github.workspace }}/.install_qt/' | |
install-deps: 'true' | |
modules: 'qt5compat' | |
cache: 'true' | |
cache-key-prefix: 'install-qt-action' | |
setup-python: 'false' | |
set-env: 'true' | |
tools-only: 'false' | |
# We need to clone https://invent.kde.org/frameworks/extra-cmake-modules.git | |
# Build it and install to some place | |
# The add the install path to CMAKE_PREFIX_PATH | |
# Export using Gitub Actions export | |
- name: Build and Install ECM | |
if: matrix.os != 'ubuntu-24.04' | |
run: | | |
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git | |
cd extra-cmake-modules | |
git checkout v6.10.0 | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=${{ github.workspace }}/.install_ecm/ | |
cmake --build . | |
cmake --install . | |
- name: Install Linux Depends | |
if: matrix.os == 'ubuntu-24.04' | |
run: | | |
echo "deb [trusted=yes] http://ftp.debian.org/debian trixie main contrib non-free non-free-firmware" | sudo tee /etc/apt/sources.list.d/trixie.list | |
sudo apt-mark hold base-files | |
sudo apt update | |
sudo apt install -y libxcb1-dev libxcb-shape0-dev libxcb-icccm4-dev patchelf | |
sudo apt install -y devscripts equivs | |
sudo mk-build-deps -i -t "apt --yes" -r | |
- name: Build Package | |
env: | |
CMAKE_PREFIX_PATH: ${{ github.workspace }}/.install_ecm/ | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools wheel | |
python setup.py bdist_wheel | |
- name: Fix package platform on Linux | |
if: matrix.os == 'ubuntu-24.04' | |
run: | | |
python -m pip install auditwheel | |
auditwheel repair --exclude "*.so.*" --plat "manylinux_2_39_x86_64" dist/*.whl -w fix-dist/ | |
rm dist/*.whl | |
mv fix-dist/*.whl dist/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-package-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/* | |
if-no-files-found: 'error' | |
publish: | |
name: Publish | |
needs: python-package | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist/ | |
merge-multiple: true | |
- name: Prepare packages | |
run: | | |
cp -r dist test_dist | |
cp -r dist release_dist | |
- name: Publish distribution 📦 to Test PyPI | |
if: github.event_name == 'push' | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: test_dist/ | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: release_dist/ | |
repository-url: https://upload.pypi.org/legacy/ | |