Skip to content

✨ Downstream testing #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
179 changes: 179 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
# Copyright (c) 2025 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

name: Downstream Tests
on:
push:
branches:
- main
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
downstream-cpp-test:
strategy:
matrix:
package:
- { user: munich-quantum-toolkit, repo: core, setup-z3: false }
- { user: cda-tum, repo: mqt-qcec, setup-z3: false }
- { user: cda-tum, repo: mqt-qmap, setup-z3: true }
- { user: cda-tum, repo: mqt-ddsim, setup-z3: false }
name: ${{ matrix.package.user }}/${{ matrix.package.repo }} • 🇨‌ • CI
permissions:
contents: read
uses: ./.github/workflows/reusable-cpp-ci.yml
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
setup-z3: ${{ matrix.package.setup-z3 }}
# enable running on all supported combinations
enable-ubuntu2404-gcc-release: true
enable-ubuntu2404-arm-gcc-release: true
enable-macos13-clang-release: true
enable-macos14-clang-release: true
enable-windows2022-msvc-release: true
enable-ubuntu2404-gcc-debug: true
enable-ubuntu2404-clang-release: true
enable-ubuntu2404-clang-debug: true
enable-ubuntu2204-gcc-release: true
enable-ubuntu2204-gcc-debug: true
enable-ubuntu2204-clang-release: true
enable-ubuntu2204-clang-debug: true
enable-ubuntu2404-arm-gcc-debug: true
enable-ubuntu2404-arm-clang-release: true
enable-ubuntu2404-arm-clang-debug: true
enable-ubuntu2204-arm-gcc-release: true
enable-ubuntu2204-arm-gcc-debug: true
enable-ubuntu2204-arm-clang-release: true
enable-ubuntu2204-arm-clang-debug: true
enable-macos13-clang-debug: true
enable-macos13-gcc-release: true
enable-macos13-gcc-debug: true
enable-macos14-clang-debug: true
enable-macos14-gcc-release: true
enable-macos14-gcc-debug: true
enable-macos15-clang-release: true
enable-macos15-clang-debug: true
enable-macos15-gcc-release: true
enable-macos15-gcc-debug: true
enable-windows2022-msvc-debug: true
enable-windows2022-clang-release: true
enable-windows2022-clang-debug: true
enable-windows2025-msvc-release: true
enable-windows2025-msvc-debug: true
enable-windows2025-clang-release: true
enable-windows2025-clang-debug: true

downstream-python-test:
strategy:
matrix:
package:
- { user: munich-quantum-toolkit, repo: core, setup-z3: false }
- { user: cda-tum, repo: mqt-qcec, setup-z3: false }
- { user: cda-tum, repo: mqt-qmap, setup-z3: true }
- { user: cda-tum, repo: mqt-ddsim, setup-z3: false }
- { user: cda-tum, repo: mqt-bench, setup-z3: false }
name: ${{ matrix.package.user }}/${{ matrix.package.repo }} • 🐍‌ • CI
permissions:
contents: read
id-token: write
uses: ./.github/workflows/reusable-python-ci.yml
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
setup-z3: ${{ matrix.package.setup-z3 }}
upload-coverage: false
# enable running on all supported combinations
enable-ubuntu2404: true
enable-ubuntu2204: true
enable-ubuntu2404-arm: true
enable-ubuntu2204-arm: true
enable-macos13: true
enable-macos14: true
enable-macos15: true
enable-windows2022: true
enable-windows2025: true
# testing Python on Windows 11 ARM is not supported by the ecosystem at the moment
enable-windows11-arm: false

downstream-python-linter:
strategy:
matrix:
package:
- { user: munich-quantum-toolkit, repo: core, setup-z3: false }
- { user: cda-tum, repo: mqt-qcec, setup-z3: false }
- { user: cda-tum, repo: mqt-qmap, setup-z3: true }
- { user: cda-tum, repo: mqt-ddsim, setup-z3: false }
- { user: cda-tum, repo: mqt-bench, setup-z3: false }
name: ${{ matrix.package.user }}/${{ matrix.package.repo }} • 🐍‌ • Lint
permissions:
contents: read
uses: ./.github/workflows/reusable-python-linter.yml
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
setup-z3: ${{ matrix.package.setup-z3 }}

downstream-python-packaging:
strategy:
matrix:
package:
- {
user: munich-quantum-toolkit,
repo: core,
setup-z3: false,
pure-python: false,
}
- {
user: cda-tum,
repo: mqt-qcec,
setup-z3: false,
pure-python: false,
}
- {
user: cda-tum,
repo: mqt-qmap,
setup-z3: true,
pure-python: false,
}
- {
user: cda-tum,
repo: mqt-ddsim,
setup-z3: false,
pure-python: false,
}
- {
user: cda-tum,
repo: mqt-bench,
setup-z3: false,
pure-python: true,
}
name: ${{ matrix.package.user }}/${{ matrix.package.repo }} • 🐍‌ • Packaging
permissions:
contents: read
uses: ./.github/workflows/reusable-python-packaging.yml
with:
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
upload-artifacts: false
setup-z3: ${{ matrix.package.setup-z3 }}
pure-python: ${{ matrix.package.pure-python }}
# enable running on all supported combinations
enable-ubuntu2404: true
enable-ubuntu2404-arm: true
enable-macos13: true
enable-macos14: true
enable-windows2022: true
# disable commonly unused runners for packaging
enable-ubuntu2204: true
enable-ubuntu2204-arm: true
enable-macos15: false
enable-windows2025: false
# Only select MQT packages currently support packaging on Windows 11 ARM
enable-windows11-arm: false
9 changes: 9 additions & 0 deletions .github/workflows/reusable-cpp-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ on:
workflow_call:
inputs:
###---- General inputs ----------------------------------------------------------------------------------------###
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
cmake-args:
description: >
Additional arguments to pass to CMake on every OS. Defaults to an empty string.
Expand Down Expand Up @@ -386,6 +392,7 @@ jobs:
fail-fast: false
uses: ./.github/workflows/reusable-cpp-tests-ubuntu.yml
with:
repository: ${{ inputs.repository }}
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
Expand All @@ -403,6 +410,7 @@ jobs:
fail-fast: false
uses: ./.github/workflows/reusable-cpp-tests-macos.yml
with:
repository: ${{ inputs.repository }}
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
Expand All @@ -420,6 +428,7 @@ jobs:
fail-fast: false
uses: ./.github/workflows/reusable-cpp-tests-windows.yml
with:
repository: ${{ inputs.repository }}
runs-on: ${{ matrix.runs-on }}
compiler: ${{ matrix.compiler }}
config: ${{ matrix.config }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-cpp-tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ name: 🇨 • Tests • macos
on:
workflow_call:
inputs:
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
runs-on:
description: >
The macOS runner image to use. Defaults to 'macos-latest'.
Expand Down Expand Up @@ -57,6 +63,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# optionally set up Z3
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-cpp-tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ name: 🇨 • Tests • ubuntu
on:
workflow_call:
inputs:
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
runs-on:
description: >
The ubuntu runner image to use. Defaults to 'ubuntu-latest'.
Expand Down Expand Up @@ -57,6 +63,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# optionally set up Z3
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-cpp-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ name: 🇨 • Tests • windows
on:
workflow_call:
inputs:
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
runs-on:
description: >
The Windows runner image to use. Defaults to 'windows-latest'.
Expand Down Expand Up @@ -60,6 +66,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# optionally set up Z3
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/reusable-python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ on:
workflow_call:
inputs:
###---- General inputs ----------------------------------------------------------------------------------------###
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
upload-coverage:
description: "Whether to upload the generated coverage reports"
default: true
type: boolean
setup-z3:
description: "Whether to set up Z3"
default: false
Expand Down Expand Up @@ -130,12 +140,15 @@ jobs:
include: ${{ fromJson(needs.build-matrix.outputs.matrix) }}
uses: ./.github/workflows/reusable-python-tests.yml
with:
repository: ${{ inputs.repository }}
upload-coverage: ${{ inputs.upload-coverage }}
runs-on: ${{ matrix.runs-on }}
setup-z3: ${{ inputs.setup-z3 }}
z3-version: ${{ inputs.z3-version }}

python-coverage-upload:
name: 📈
if: ${{ inputs.upload-coverage }}
needs: [python-tests]
runs-on: ubuntu-latest
permissions:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/reusable-python-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ name: 🐍 • Lint
on:
workflow_call:
inputs:
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
setup-z3:
description: "Whether to set up Z3"
default: false
Expand All @@ -28,6 +34,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# optionally set up Z3
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/reusable-python-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ on:
workflow_call:
inputs:
###---- General inputs ----------------------------------------------------------------------------------------###
repository:
description: >
The repository to run this action on.
Defaults to the repository this workflow is running in (`github.repository`).
default: ${{ github.repository }}
type: string
upload-artifacts:
description: "Whether to upload the generated artifacts"
default: true
type: boolean
pure-python:
description: "Whether this is a pure Python package (or contains compiled extensions)"
default: false
Expand Down Expand Up @@ -90,6 +100,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# set up uv for faster Python package management
Expand All @@ -103,6 +114,7 @@ jobs:
run: uvx twine check dist/*
# upload the source distribution as an artifact (adds a `dev-` prefix for PRs)
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ inputs.upload-artifacts }}
with:
name: ${{ github.event_name == 'pull_request' && 'dev-' || '' }}cibw-sdist
path: dist/*.tar.gz
Expand All @@ -115,6 +127,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# set up uv for faster Python package management
Expand All @@ -128,6 +141,7 @@ jobs:
run: uvx twine check dist/*
# upload the wheel as an artifact (adds a `dev-` prefix for PRs)
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ inputs.upload-artifacts }}
with:
name: ${{ github.event_name == 'pull_request' && 'dev-' || '' }}cibw-wheel
path: dist/*.whl
Expand Down Expand Up @@ -188,6 +202,7 @@ jobs:
# check out the repository (including submodules and all history)
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
repository: ${{ inputs.repository }}
submodules: recursive
fetch-depth: 0
# optionally set up Z3 (non-Ubuntu only)
Expand Down Expand Up @@ -217,6 +232,7 @@ jobs:
# upload the wheels as an artifact (adds a `dev-` prefix for PRs)
- name: Upload wheels
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: ${{ inputs.upload-artifacts }}
with:
name: ${{ github.event_name == 'pull_request' && 'dev-' || '' }}cibw-wheels-${{ matrix.runs-on }}-${{ strategy.job-index }}
path: wheelhouse/*.whl
Loading
Loading