Skip to content

[#852] Re-add the "Actual CLUT" comparison to the Qt profile info viewer #1305

[#852] Re-add the "Actual CLUT" comparison to the Qt profile info viewer

[#852] Re-add the "Actual CLUT" comparison to the Qt profile info viewer #1305

Workflow file for this run

name: Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, unlabeled]
branches:
- develop
push:
branches:
- develop
# Centralized variables for easy updates
env:
ARGYLL_VERSION: "3.5.0"
ARGYLL_REPO: "https://github.com/eoyilmaz/argyllcms-binaries/releases/download"
# Pinned wxPython release, available as a pre-built wheel for every
# supported Python version.
WX_VERSION: "4.2.5"
# Belt-and-suspenders: the Qt test files already set this via
# os.environ.setdefault() before importing Qt, but setting it here too
# means any future test or code path that imports Qt earlier can't
# accidentally try to open a real (nonexistent on these runners) display.
QT_QPA_PLATFORM: "offscreen"
jobs:
linux:
name: Linux + Python ${{ matrix.python-version }}
env:
DISPLAY: :0
DEBIAN_FRONTEND: noninteractive
runs-on: ubuntu-24.04
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- name: Setup xvfb
run: |
sudo apt-get install -y xvfb \
libxkbcommon-x11-0 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-randr0 \
libxcb-render-util0 \
libxcb-xinerama0 \
libxcb-xinput0 \
libxcb-xfixes0
# start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Setup libnotify4
run: |
sudo apt-get install -y libnotify4
- name: Install ArgyllCMS (Linux)
run: |
curl -L "${{ env.ARGYLL_REPO }}/${{ env.ARGYLL_VERSION }}/Argyll_V${{ env.ARGYLL_VERSION }}_linux_x86_64_bin.tgz" -o argyll.tgz
mkdir argyllcms
tar -xzf argyll.tgz -C argyllcms --strip-components=1
echo "$GITHUB_WORKSPACE/argyllcms/bin" >> $GITHUB_PATH
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
set -euxo pipefail
sudo apt-get update -y
packages="$(awk '!/^\s*(#|$)/ { print $1 }' packages.list | xargs)"
for attempt in 1 2 3; do
if sudo apt-get install -y --no-install-recommends ${packages}; then
break
fi
if [ "${attempt}" -eq 3 ]; then
exit 1
fi
sudo apt-get -f install -y || true
sleep "$((attempt * 10))"
done
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install wheel helper
run: uv pip install --system wheel
- name: Install wxPython ${{ env.WX_VERSION }}
run: |
set -euo pipefail
py_version="${{ matrix.python-version }}"
py_version="${py_version//./}"
wx_url="https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-24.04/wxpython-${{ env.WX_VERSION }}-cp${py_version}-cp${py_version}-linux_x86_64.whl"
for attempt in 1 2 3; do
if uv pip install --system "${wx_url}"; then
break
fi
if [ "${attempt}" -eq 3 ]; then
exit 1
fi
sleep "$((attempt * 10))"
done
- name: Install Python dependencies
run: |
uv pip install --system -r requirements-tests.txt -r requirements-dev.txt
- name: Build DisplayCAL
run: |
sudo chmod a+rw /etc/udev/rules.d
python3 -m build
wheel_file=$(ls dist/*.whl)
echo wheel_file=$wheel_file
uv pip install --system $wheel_file
- name: Test with pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pytest --verbose -n auto -W ignore --color=yes -m "not network" --durations=50
- name: Dump thread stacks (diagnostic, see conftest.py)
if: always()
run: cat faulthandler_dump.log || true
windows:
name: Windows + Python ${{ matrix.python-version }}
runs-on: windows-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- name: Install ArgyllCMS (Windows)
run: |
$url = "${{ env.ARGYLL_REPO }}/${{ env.ARGYLL_VERSION }}/Argyll_V${{ env.ARGYLL_VERSION }}_win64_exe.zip"
Invoke-WebRequest -Uri $url -OutFile "argyll.zip"
Expand-Archive -Path "argyll.zip" -DestinationPath "$env:USERPROFILE\argyllcms"
$binPath = Get-ChildItem -Path "$env:USERPROFILE\argyllcms\*\bin" | Select-Object -First 1
echo $binPath.FullName >> $env:GITHUB_PATH
shell: pwsh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install wheel helper
run: uv pip install --system wheel
- name: Fix user Scripts missing from PATH
run: |
$ScriptsPath = python -c "import sysconfig,os; print(sysconfig.get_path('scripts'))"
Add-Content $env:GITHUB_PATH $ScriptsPath
- name: Install wxPython ${{ env.WX_VERSION }}
run: |
for ($attempt = 1; $attempt -le 3; $attempt++) {
uv pip install --system wxPython==${{ env.WX_VERSION }}
if ($LASTEXITCODE -eq 0) {
break
}
if ($attempt -eq 3) {
exit 1
}
Start-Sleep -Seconds ($attempt * 10)
}
shell: pwsh
- name: Install Python dependencies
run: |
uv pip install --system -r requirements-tests.txt -r requirements-dev.txt
- name: Fix pywin32
run: |
$ScriptsPath = python -c "import sysconfig,os; print(sysconfig.get_path('scripts'))"
python "$ScriptsPath\pywin32_postinstall.py" -install
- name: Build DisplayCAL
run: |
python -m build
$wheel_file = Get-ChildItem dist\*.whl
echo "wheel_file=$wheel_file"
uv pip install --system $wheel_file
- name: Test with pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pytest --verbose -n auto -W ignore --color=yes -m "not network" --durations=50
macos:
name: macOS + Python ${{ matrix.python-version }}
runs-on: macos-14
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v5
- name: Install ArgyllCMS (macOS arm64)
run: |
curl -L "${{ env.ARGYLL_REPO }}/${{ env.ARGYLL_VERSION }}/Argyll_V${{ env.ARGYLL_VERSION }}_macOS11_arm64_bin.tgz" -o argyll.tgz
mkdir argyllcms
tar -xzf argyll.tgz -C argyllcms --strip-components=1
# Ad-hoc sign all binaries to prevent macOS Gatekeeper OCSP verification
# delays (30-120s per unsigned binary per worker process).
xattr -rd com.apple.quarantine argyllcms || true
find argyllcms/bin -type f -exec codesign -f -s - {} \;
echo "$GITHUB_WORKSPACE/argyllcms/bin" >> $GITHUB_PATH
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install wheel helper
run: uv pip install --system wheel
- name: Install wxPython ${{ env.WX_VERSION }}
run: |
set -euo pipefail
for attempt in 1 2 3; do
if uv pip install --system wxPython==${{ env.WX_VERSION }}; then
break
fi
if [ "${attempt}" -eq 3 ]; then
exit 1
fi
sleep "$((attempt * 10))"
done
- name: Install Python dependencies
run: |
uv pip install --system -r requirements-tests.txt -r requirements-dev.txt
- name: Build DisplayCAL
run: |
python -m build
wheel_file=$(ls dist/*.whl)
echo wheel_file=$wheel_file
uv pip install --system "$wheel_file"
- name: Test with pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pytest --verbose -n auto -W ignore --color=yes -m "not network" --durations=50
- name: Dump thread stacks (diagnostic, see conftest.py)
if: always()
run: cat faulthandler_dump.log || true