From 8134f2d896ba5893821ac794ba995e5973631386 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 10 Jan 2026 15:39:22 +1100 Subject: [PATCH 1/2] Allow the QA Github workflow action to be triggered manually using only one OS for quick testing. Maintains backwards compatibility to always run all by default and when not being run manually. --- .github/workflows/qa.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 80913df3e5..53a22b0f67 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -6,6 +6,29 @@ on: - cron: '0 18 * * *' workflow_dispatch: inputs: + platform: + description: 'Platform to test (default: all platforms)' + type: choice + default: 'all' + options: + - all + - debian11-container + - debian12-container + - debian13-container + - ubuntu1804-container + - ubuntu1804-i386-container + - ubuntu2004-container + - ubuntu2004 + - ubuntu2204-container + - ubuntu2204 + - ubuntu2404-container + - ubuntu2404 + - fedora42-container + - fedora43-container + - fedora-rawhide-container + - centos-stream8-container + - centos-stream9-container + - centos-stream10-container pcp_qa_args: description: '(optional) overwrite ./check args (e.g. "-g pmproxy -g pmseries")' @@ -13,7 +36,8 @@ jobs: run_qa: name: ${{ matrix.platform }} # do not run this workflow on schedule for forks of the main repository - if: github.event_name != 'schedule' || github.repository == 'performancecopilot/pcp' + # when triggered manually, optionally run only the selected platform + if: (github.event_name != 'schedule' || github.repository == 'performancecopilot/pcp') && (github.event_name != 'workflow_dispatch' || github.event.inputs.platform == 'all' || github.event.inputs.platform == matrix.platform) runs-on: ${{ matrix.os }} # do not mark the workflow as failed if an experimental distro (e.g. rawhide) fails continue-on-error: ${{ matrix.experimental }} From 10824feaacad01df38ed167109174b9d342c2148 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sat, 10 Jan 2026 15:43:08 +1100 Subject: [PATCH 2/2] Allow the QA Github workflow action to be triggered manually using only one OS for quick testing. Maintains backwards compatibility to always run all by default and when not being run manually. --- .github/workflows/qa.yml | 67 +++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 22 deletions(-) diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 53a22b0f67..9e9e132dab 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -33,35 +33,58 @@ on: description: '(optional) overwrite ./check args (e.g. "-g pmproxy -g pmseries")' jobs: + setup: + name: Setup Matrix + # do not run this workflow on schedule for forks of the main repository + if: github.event_name != 'schedule' || github.repository == 'performancecopilot/pcp' + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + steps: + - name: Set matrix + id: set-matrix + run: | + # Define all platforms with their configurations + ALL_PLATFORMS='[ + {"platform": "debian11-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "debian12-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "debian13-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu1804-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu1804-i386-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2004-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2004", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2204-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2204", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2404-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "ubuntu2404", "os": "ubuntu-latest", "experimental": false}, + {"platform": "fedora42-container", "os": "ubuntu-22.04", "experimental": false}, + {"platform": "fedora43-container", "os": "ubuntu-22.04", "experimental": false}, + {"platform": "fedora-rawhide-container", "os": "ubuntu-22.04", "experimental": true}, + {"platform": "centos-stream8-container", "os": "ubuntu-latest", "experimental": false}, + {"platform": "centos-stream9-container", "os": "ubuntu-22.04", "experimental": false}, + {"platform": "centos-stream10-container", "os": "ubuntu-22.04", "experimental": false} + ]' + + SELECTED_PLATFORM="${{ github.event.inputs.platform }}" + + if [ -z "$SELECTED_PLATFORM" ] || [ "$SELECTED_PLATFORM" = "all" ]; then + # Run all platforms + echo "matrix={\"include\":$ALL_PLATFORMS}" >> $GITHUB_OUTPUT + else + # Filter to selected platform + FILTERED=$(echo "$ALL_PLATFORMS" | jq -c --arg p "$SELECTED_PLATFORM" '[.[] | select(.platform == $p)]') + echo "matrix={\"include\":$FILTERED}" >> $GITHUB_OUTPUT + fi + run_qa: name: ${{ matrix.platform }} - # do not run this workflow on schedule for forks of the main repository - # when triggered manually, optionally run only the selected platform - if: (github.event_name != 'schedule' || github.repository == 'performancecopilot/pcp') && (github.event_name != 'workflow_dispatch' || github.event.inputs.platform == 'all' || github.event.inputs.platform == matrix.platform) + needs: setup runs-on: ${{ matrix.os }} # do not mark the workflow as failed if an experimental distro (e.g. rawhide) fails continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false - matrix: - include: - - {platform: debian11-container, os: ubuntu-latest, experimental: false} - - {platform: debian12-container, os: ubuntu-latest, experimental: false} - - {platform: debian13-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu1804-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu1804-i386-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2004-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2004, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2204-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2204, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2404-container, os: ubuntu-latest, experimental: false} - - {platform: ubuntu2404, os: ubuntu-latest, experimental: false} - - {platform: fedora42-container, os: ubuntu-22.04, experimental: false} - - {platform: fedora43-container, os: ubuntu-22.04, experimental: false} - - {platform: fedora-rawhide-container, os: ubuntu-22.04, experimental: true } - - {platform: centos-stream8-container, os: ubuntu-latest, experimental: false} - - {platform: centos-stream9-container, os: ubuntu-22.04, experimental: false} - - {platform: centos-stream10-container, os: ubuntu-22.04, experimental: false} + matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} steps: - name: Checkout sources uses: actions/checkout@v6