diff --git a/.github/workflows/v2-build-branch-dev.yml b/.github/workflows/v2-build-branch-dev.yml index 53481c64ba..eae2de3ade 100644 --- a/.github/workflows/v2-build-branch-dev.yml +++ b/.github/workflows/v2-build-branch-dev.yml @@ -2,7 +2,8 @@ name: V2 Build QML Branch - Dev on: workflow_dispatch: schedule: - - cron: '0 0 * * 1,3,5' # At 00:00 on Sunday (Monday am), Tuesday (Wednesday am), Thursday (Friday am). + - cron: '0 5 * * 1,3,5' # At 05:00 (12am EST) on Sunday (Monday am), Tuesday (Wednesday am), Thursday (Friday am). + #- cron: '0 10 * * *' # At 10:00 (5am EST) on every day-of-week. Use this during feature freeze. concurrency: group: v2-build-qml-demo-branch-dev diff --git a/.github/workflows/v2-build-branch-master.yml b/.github/workflows/v2-build-branch-master.yml index 29b23a8a3a..f473853e30 100644 --- a/.github/workflows/v2-build-branch-master.yml +++ b/.github/workflows/v2-build-branch-master.yml @@ -2,7 +2,7 @@ name: V2 Build QML Branch - Master on: workflow_dispatch: schedule: - - cron: '0 0 * * 1,3,5' # At 00:00 on Sunday (Monday am), Tuesday (Wednesday am), Thursday (Friday am). + - cron: '0 5 * * 1,3,5' # At 05:00 (12am EST) on Sunday (Monday am), Tuesday (Wednesday am), Thursday (Friday am). concurrency: group: v2-build-qml-demo-branch-master diff --git a/.github/workflows/v2-build-demos.yml b/.github/workflows/v2-build-demos.yml index b2bd86c2c7..ec925a2024 100644 --- a/.github/workflows/v2-build-demos.yml +++ b/.github/workflows/v2-build-demos.yml @@ -169,6 +169,7 @@ jobs: - name: Install pandoc, opencl, and graphviz run: | + sudo apt-get update sudo apt-get install -y \ ocl-icd-opencl-dev \ pandoc \ diff --git a/dependencies/constraints-plc-dev.txt b/dependencies/constraints-plc-dev.txt new file mode 100644 index 0000000000..745f5c2048 --- /dev/null +++ b/dependencies/constraints-plc-dev.txt @@ -0,0 +1,8 @@ +# Specifies constraints for PennyLane, Lightning, and Catalyst dev builds. +# These need to be installed separately, and in a specific order, and as such are not controlled +# by the constraints-dev.txt file. Please do not change the order of these constraints. +# Use upper bounds targeting the next-to-next stable release so we continue to build RC branches during feature freeze. + +pennylane-catalyst<0.15.0 +pennylane-lightning<0.45.0 +pennylane<0.45.0 diff --git a/lib/qml/context.py b/lib/qml/context.py index 0c903100b6..b6f419f8bf 100644 --- a/lib/qml/context.py +++ b/lib/qml/context.py @@ -49,6 +49,10 @@ def stable_constraints_file(self) -> Path: def dev_constraints_file(self) -> Path: return self.repo_root / "dependencies" / "constraints-dev.txt" + @property + def plc_dev_constraints_file(self) -> Path: + return self.repo_root / "dependencies" / "constraints-plc-dev.txt" + @property def build_requirements_file(self) -> Path: return self.repo_root / "dependencies" / "requirements-build.txt" diff --git a/lib/qml/lib/demo.py b/lib/qml/lib/demo.py index 9f18146455..fc0c08ae4b 100644 --- a/lib/qml/lib/demo.py +++ b/lib/qml/lib/demo.py @@ -292,30 +292,24 @@ def _build_demo( # If dev, we need to re-install the latest Catalyst, then Lightning, then PennyLane # in that order, regardless of conflicts/warnings. if dev: - # Catalyst - cmds.pip_install( - build_venv.python, - "--upgrade", - "--extra-index-url", - "https://test.pypi.org/simple/", - "PennyLane-Catalyst", - use_uv=False, - quiet=False, - pre=True, - ) - # Lightning - cmds.pip_install( - build_venv.python, - "--upgrade", - "--extra-index-url", - "https://test.pypi.org/simple/", - "PennyLane-Lightning", - use_uv=False, - quiet=False, - pre=True, - ) - if dev: - # Need dev version of PennyLane to build, whether or not we're executing + with open(ctx.plc_dev_constraints_file, "r") as f: + packages = f.readlines() + for package in packages: + package = package.strip() + if package and not package.startswith("#"): + cmds.pip_install( + build_venv.python, + "--upgrade", + "--index-url", + "https://test.pypi.org/simple/", + package, + use_uv=False, + quiet=False, + pre=True, + ) + + elif dev: + # Need latest version of PennyLane to build, whether or not we're executing cmds.pip_install( build_venv.python, "--upgrade",