From 36635f7dd21dd0de5da79a0398beae7295c6f88d Mon Sep 17 00:00:00 2001 From: Scott Thornton Date: Mon, 14 Sep 2026 20:39:32 +0000 Subject: [PATCH 1/2] Pin bash for lib_algorithms run steps; bump cudaq pin to 0.16.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump .cudaq_version to the CUDA-Q 0.16.0 release tag commit (51671baac373c545c9651c3cfa1a8d371aa67ec7). The from-source Algorithms lanes failed at pytest with 'No module named cudaq' even though the CUDA-Q build succeeded and installed cudaq/__init__.py at the /cudaq-install prefix root. The 'Run tests' step in lib_algorithms.yaml has no explicit shell, and inside the cuda-quantum devcontainer the runner's default resolves to sh (dash). Its 'if [[ "${{ inputs.cudaq_source }}" == "source" ]]' condition fails under dash ('[[: not found'), and a failing command in an if condition does not trip 'sh -e' — so the step silently took the else branch and ran the test script with --pip-cudaq, which leaves the source build off PYTHONPATH. The 'Configure' step's cache_key_suffix [[ test has the same latent problem. Set a workflow-level 'defaults: run: shell: bash' so every plain run step in this workflow gets bash (the container has it; the composite actions already use it explicitly). Signed-off-by: Scott Thornton --- .cudaq_version | 2 +- .github/workflows/lib_algorithms.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.cudaq_version b/.cudaq_version index fca6044..4eb68cd 100644 --- a/.cudaq_version +++ b/.cudaq_version @@ -1,6 +1,6 @@ { "cudaq": { "repository": "NVIDIA/cuda-quantum", - "ref": "b28cf0f6f2d9387f12ca81b6824b8833a38530af" + "ref": "51671baac373c545c9651c3cfa1a8d371aa67ec7" } } diff --git a/.github/workflows/lib_algorithms.yaml b/.github/workflows/lib_algorithms.yaml index 4ec808a..c16fe84 100644 --- a/.github/workflows/lib_algorithms.yaml +++ b/.github/workflows/lib_algorithms.yaml @@ -55,6 +55,15 @@ concurrency: group: ${{ github.workflow }}-build-algorithms-${{ github.ref }} cancel-in-progress: true +# The build-and-test job runs inside the cuda-quantum devcontainer, where +# the runner's default shell for `run:` steps resolves to `sh` (dash). +# The steps below use bash syntax (`[[ ]]`), which dash rejects — and a +# failing `[[` inside an `if` condition silently selects the else branch +# instead of erroring the step. Pin bash explicitly. +defaults: + run: + shell: bash + jobs: build-and-test: name: Build and test From 638e76d8e70c5b55319fbf75549e938e3ee7d380 Mon Sep 17 00:00:00 2001 From: Scott Thornton Date: Mon, 14 Sep 2026 23:55:44 +0000 Subject: [PATCH 2/2] Scope the build concurrency groups by cudaq source MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A .cudaq_version change makes pr_workflow invoke lib_algorithms twice in one run (pip lanes + pin-triggered source lanes) and wheel_algorithms in both PyPI and Custom modes. Both reusable workflows keyed their concurrency group on github.ref alone, so the second invocation cancelled the first — the source and pip Algorithms lanes kept cancelling each other on this PR. Add the source/mode input to each group so the concurrent invocations are distinct. Signed-off-by: Scott Thornton --- .github/workflows/lib_algorithms.yaml | 5 ++++- .github/workflows/wheel_algorithms.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lib_algorithms.yaml b/.github/workflows/lib_algorithms.yaml index c16fe84..e54820d 100644 --- a/.github/workflows/lib_algorithms.yaml +++ b/.github/workflows/lib_algorithms.yaml @@ -52,7 +52,10 @@ on: required: false concurrency: - group: ${{ github.workflow }}-build-algorithms-${{ github.ref }} + # cudaq_source must be part of the group: one PR run can invoke this + # workflow twice (pip lanes + pin-triggered source lanes), and a + # shared group would have the later invocation cancel the earlier. + group: ${{ github.workflow }}-build-algorithms-${{ inputs.cudaq_source }}-${{ github.ref }} cancel-in-progress: true # The build-and-test job runs inside the cuda-quantum devcontainer, where diff --git a/.github/workflows/wheel_algorithms.yaml b/.github/workflows/wheel_algorithms.yaml index 97eded5..b755dc1 100644 --- a/.github/workflows/wheel_algorithms.yaml +++ b/.github/workflows/wheel_algorithms.yaml @@ -58,7 +58,10 @@ on: required: false concurrency: - group: ${{ github.workflow }}-build-wheels-${{ github.ref }} + # cudaq_wheels must be part of the group: a pin change invokes this + # workflow in both PyPI and Custom modes within one PR run, and a + # shared group would cancel the first with the second. + group: ${{ github.workflow }}-build-wheels-${{ inputs.cudaq_wheels }}-${{ github.ref }} cancel-in-progress: true jobs: