Skip to content
Merged
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
151 changes: 87 additions & 64 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,102 +15,115 @@ env:
RAW_VERSION: ${{ github.ref_name }}

jobs:
# -------------------------------------------------------------------------
# Core lint-and-test matrix (server + driver)
# -------------------------------------------------------------------------
lint-and-test-server-and-driver:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.25.x']
python-version: ['3.12']
node-version: ['20.x']
# 'sim' is not an executor — it is the simulated chip the tier-3
# physics tests and the whole calibrate/execute loop run against.
# Without it here, none of those ever run on CI.
extra: ['mock', 'aer', 'quantify', 'qblox', 'sim']

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: '1.26.x'
cache-dependency-path: 'qpi-ui/go.sum'

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
python-version: ${{ matrix.python-version }}
python-version: '3.12'
enable-cache: true
cache-dependency-glob: "qpi-driver/py/pyproject.toml"

- name: Set up nodejs
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: '22.x'

- name: Install dependencies & formatting tools
run: |
if [ "${{ matrix.extra }}" = "mock" ]; then
uv sync --project qpi-driver/py --extra cli --dev
elif [ "${{ matrix.extra }}" = "aer" ]; then
uv sync --project qpi-driver/py --extra cli --extra aer --dev
elif [ "${{ matrix.extra }}" = "quantify" ]; then
uv sync --project qpi-driver/py --extra cli --extra quantify --dev
elif [ "${{ matrix.extra }}" = "qblox" ]; then
uv sync --project qpi-driver/py --extra cli --extra qblox --dev
elif [ "${{ matrix.extra }}" = "sim" ]; then
# Both schedulers: the loop tests are parametrised over them.
uv sync --project qpi-driver/py --extra cli --extra quantify --extra qblox --extra sim --dev
fi
sudo apt-get update && sudo apt-get install -y zip
- name: Install dependencies
run: uv sync --project qpi-driver/py --extra cli --dev

- name: Build dashboard
run: make build-dashboard
# Builds the dashboard itself, which `go vet` needs: main.go embeds its dist.
- name: Lint orchestrator
run: make lint-go

- name: Lint ochestrator
run: make lint-go

- name: Lint driver
run: make lint-py

- name: Test CLI
- name: Test CLI
run: make test-py-cli

- name: Test simulator
run: |
make test-py-sim

lint-and-test-server-and-driver-per-extra:
runs-on: ubuntu-latest
strategy:
matrix:
extra: ['mock', 'aer', 'quantify', 'qblox']

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.x'
cache-dependency-path: 'qpi-ui/go.sum'

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
python-version: '3.12'
enable-cache: true
cache-dependency-glob: "qpi-driver/py/pyproject.toml"

- name: Set up nodejs
uses: actions/setup-node@v4
with:
node-version: '22.x'

- name: Install dependencies
run: uv sync --project qpi-driver/py --extra cli --extra ${{ matrix.extra }} --dev

- name: Build dashboard
run: make build-dashboard

- name: Run Python Unit Tests for '${{ matrix.extra }}'
run: |
if [ "${{ matrix.extra }}" = "mock" ]; then
make test-py-base
elif [ "${{ matrix.extra }}" = "aer" ]; then
make test-py-aer
elif [ "${{ matrix.extra }}" = "quantify" ]; then
make test-py-quantify
elif [ "${{ matrix.extra }}" = "qblox" ]; then
make test-py-qblox
elif [ "${{ matrix.extra }}" = "sim" ]; then
# The routines against real physics, then the whole loop: calibrate a
# simulated chip and run circuits on what the calibration wrote.
make test-py-sim
make test-py-loop
fi

# 'sim' names no executor a driver can be started with, so there is no
# driver end-to-end run for it — its own end-to-end coverage is test-py-loop.
make test-py-driver EXECUTOR=${{ matrix.extra }}

- name: Run E2E Integration Tests for driver '${{ matrix.extra }}'
if: matrix.extra != 'sim'
run: make test-e2e-driver EXECUTOR=${{ matrix.extra }}


test-simulated-calibrate-and-process-loop:
runs-on: ubuntu-latest
strategy:
matrix:
extra: ['quantify', 'qblox']

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
with:
python-version: '3.12'
enable-cache: true
cache-dependency-glob: "qpi-driver/py/pyproject.toml"

- name: Run Tests for '${{ matrix.extra }}'
run: |
make test-py-loop EXECUTOR=${{ matrix.extra }}

# -------------------------------------------------------------------------
# qpi-client / Go SDK
# -------------------------------------------------------------------------
lint-and-test-go-client:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.25.x']

steps:
- name: Checkout Code
Expand All @@ -119,7 +132,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
go-version: '1.26.x'
cache-dependency-path: 'qpi-client/go/go.sum'


Expand Down Expand Up @@ -165,7 +178,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x']
node-version: ['22.x']

steps:
- name: Checkout Code
Expand All @@ -191,7 +204,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.25.x']
go-version: ['1.26.x']

steps:
- name: Checkout Code
Expand All @@ -216,7 +229,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x']
node-version: ['22.x']

steps:
- name: Checkout Code
Expand Down Expand Up @@ -270,6 +283,11 @@ jobs:
- name: Lint dashboard
run: make lint-dashboard

# The pure helpers, before the four-minute Cypress run: a broken one fails
# here in seconds instead of as a puzzling assertion against a live server.
- name: Run Dashboard Unit Tests
run: make test-dashboard

- name: Run E2E Cypress Dashboard Tests
run: make test-e2e-dashboard

Expand Down Expand Up @@ -328,7 +346,9 @@ jobs:
# Publish qpi-driver to PyPI
# -------------------------------------------------------------------------
publish-pypi-driver:
needs: lint-and-test-server-and-driver
needs:
- lint-and-test-server-and-driver-per-extra
- lint-and-test-server-and-driver
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && vars.PUBLISH_TO_PYPI == 'true'
environment:
Expand Down Expand Up @@ -454,7 +474,10 @@ jobs:
# Publish Go server binaries to GitHub Release
# -------------------------------------------------------------------------
publish-go-release:
needs: [lint-and-test-server-and-driver, test-dashboard-cypress]
needs:
- lint-and-test-server-and-driver
- lint-and-test-server-and-driver
- test-dashboard-cypress
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && vars.PUBLISH_GO_APP == 'true'
permissions:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project follows versions of format `{year}.{month}.{patch_number}`.

## [Unreleased]

### Changed

- `repo`: Cleaned up and refactored `Makefile`.
- `repo`: Cleaned up `.github/workflows/ci.yml`.
- `qpi-driver/py`: Optimized `test-py-loop` execution speed with
`@functools.lru_cache` to `_cached_scqubits_eigenvals` in `transmon.py`.

## [0.4.1] - 2026-08-07

### Fixed
Expand Down
Loading
Loading