Skip to content

fix(ci): cache Windows Craft dependencies - #10698

Merged
Rello merged 2 commits into
masterfrom
codex/ci-windows-setup-cache
Sep 1, 2026
Merged

fix(ci): cache Windows Craft dependencies#10698
Rello merged 2 commits into
masterfrom
codex/ci-windows-setup-cache

Conversation

@Rello

@Rello Rello commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Cache the dependency-only Craft environment using the current CraftMaster and blueprint revisions. Remove the unused OpenCppCoverage setup and use a shallow checkout.

  • Baseline Windows job: approximately 34m23s
  • Expected warm-cache saving: 4m30s–5m30s per subsequent PR update
  • Expected warm runtime: approximately 29–30 minutes
  • First run is cold and may be unchanged or slightly slower because it creates the cache

Assisted-by: Codex:GPT-5

Cache the dependency-only Craft environment using the current CraftMaster and blueprint revisions. Remove the unused OpenCppCoverage setup and use a shallow checkout.

Signed-off-by: Rello <github@scherello.de>

Assisted-by: Codex:GPT-5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1643570224

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/windows-build-and-test.yml
Comment on lines +38 to +40
$craftMasterRevision = remoteRevision "https://invent.kde.org/packaging/craftmaster.git" "HEAD"
$kdeBlueprintRevision = remoteRevision "https://github.com/nextcloud/craft-blueprints-kde.git" "refs/heads/stable-34.0"
$nextcloudBlueprintRevision = remoteRevision "https://github.com/nextcloud/craft-blueprints-nextcloud.git" "refs/heads/stable-34.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the refs be read from craftmaster.ini somehow?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nilsding
good one. question for the craft revision. craftmaster.ini is using a different one.
on purpose? or do we need to use the same?
https://github.com/nextcloud/desktop/blob/master/craftmaster.ini#L5-L6

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to match what we use for our releases this should be the same

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nilsding can you check the last commit one more time? not really sure if we are doing the correct thing or if the complexity is not worth it

@github-actions

Copy link
Copy Markdown
Contributor

Artifact containing the AppImage: nextcloud-appimage-pr-10698.zip

Digest: sha256:00358f9420a0f323eb2b6aa886c47d8afbfd2f3473b538ccacddcd453f500201

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

Read the pinned Craft revision and both blueprint refs from craftmaster.ini. Reuse the blueprint refs for repository setup and resolve their current commits for the cache key.

Signed-off-by: Rello <github@scherello.de>

Assisted-by: Codex:GPT-5

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 182428e471

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

${{ env.CRAFT_MASTER_CONFIG }}
${{ github.workspace }}\craft-clone
${{ github.workspace }}\${{ env.CRAFT_TARGET }}
key: ${{ runner.os }}-craft-v1-${{ env.CRAFT_TARGET }}-python-${{ env.PYTHON_VERSION }}-${{ steps.craft-revisions.outputs.key }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Hash every cached Craft input

In this Windows pull-request workflow, the key covers only CraftRevision and the two blueprint branch tips, while the cache also restores the complete craftmaster.ini and a CraftMaster checkout cloned from its independently moving HEAD. If a later push to the same PR changes an unkeyed setting such as libs/qt6.version, libs/openssl.version, or another build option—or CraftMaster alone advances—the existing immutable cache is hit, the old configuration is restored over the checkout, and dependency installation is skipped, so CI builds against stale inputs. Include the full configuration hash and the resolved CraftMaster revision in the key, and avoid restoring the checked-in configuration itself.

Useful? React with 👍 / 👎.

@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@Rello
Rello merged commit 112ca0f into master Sep 1, 2026
19 of 21 checks passed
@Rello
Rello deleted the codex/ci-windows-setup-cache branch September 1, 2026 15:43
@Rello

Rello commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

/backport to stable-34.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants