Skip to content

ci: centralize dev-env image version + bump to v1.2.0 - #1448

Merged
marc0olo merged 6 commits into
masterfrom
chore/centralize-dev-env-version
Jul 23, 2026
Merged

ci: centralize dev-env image version + bump to v1.2.0#1448
marc0olo merged 6 commits into
masterfrom
chore/centralize-dev-env-version

Conversation

@marc0olo

@marc0olo marc0olo commented Jul 22, 2026

Copy link
Copy Markdown
Member

What

Centralizes the icp-dev-env CI image version into a single source, bumps it to v1.2.0, and fixes a few image-variant mismatches. Previously the version was hardcoded across ~60 workflow files plus the devcontainer, which had already drifted (devcontainer was on 0.3.1 while CI was on 1.0.1).

Changes (net, vs master)

  • New .github/workflows/_run-example.yml — a reusable (workflow_call) workflow that runs an example's CI steps inside the dev-env container. It is the single source of truth for the CI image version. Callers pass language (image variant), working-directory, and run (commands). Examples needing a PocketIC server use the optional install-pocketic / pocketic-version inputs.
  • All example workflows converted to thin callers of _run-example.yml — no workflow hardcodes the image version anymore. Extra setup steps (apt installs, rustup target add, model download) are folded into run; PocketIC integration tests use install-pocketic.
  • New .github/workflows/dev-env-version-check.yml — fails the PR if the devcontainer and the reusable workflow drift to different versions.
  • .devcontainer/devcontainer.json bumped icp-dev-env-all:0.3.1v1.2.0.
  • Image-variant fixes: frontend-only hosting/react and hosting/oisy-signer-demo now use the all image (were incorrectly on motoko), consistent with the other hosting/* examples.
  • .github/workflow-template.yml updated to the caller pattern.

Tag convention (v-prefix)

The dev-env release CI tags each release with a v prefix and publishes both forms to the registry — type=ref,event=tag yields v1.2.0, type=semver,pattern={{version}} yields 1.2.0. We pin the v-prefixed form (v1.2.0) to match the git release tag. dev-env-version-check.yml extracts the numeric X.Y.Z from both files, so the prefix does not affect the drift check.

Not touched: basic_bitcoin (bespoke workflow — needs a bitcoind regtest node and Docker bind-mounts, so it can't use the shared container-based workflow) and ninja_pr_checks (uses the unrelated -slim image on a Node-version tag scheme).

Result

Bumping the dev-env version is now a one-line change in _run-example.yml + devcontainer.json (kept equal by dev-env-version-check). Because each caller watches _run-example.yml in its paths:, a bump automatically re-runs every affected example — which is what this PR itself does: all example suites run against v1.2.0.

Validation

The v1.2.0 images are published (via dfinity/icp-dev-env#43), and all 63 checks pass on this PR: every example suite (Motoko + Rust, including the PocketIC and ML examples — image-classification, face-recognition), plus the dev-env-version-check drift guard with both places on v1.2.0.

🤖 Generated with Claude Code

marc0olo and others added 4 commits July 22, 2026 13:58
…llo_world)

Introduce .github/workflows/run-example.yml, a reusable (workflow_call) workflow
that runs an example's CI steps inside the ICP dev-env container. It is the
single source of truth for the dev-env image version in CI; callers pass the
language (image variant), working directory, and commands.

Convert hello_world to a thin caller as a proof of concept, bump the devcontainer
to icp-dev-env-all:1.1.0, and add dev-env-version-check.yml to guard that the
devcontainer and the reusable workflow stay on the same version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Convert every example workflow to call the reusable _run-example.yml, so no
workflow hardcodes the dev-env image version anymore — the version lives only in
_run-example.yml and .devcontainer/devcontainer.json (guarded by
dev-env-version-check.yml). Each caller passes language, working-directory, and
the commands to run; extra setup steps (apt installs, rustup targets, model
downloads) are folded into the run block, and PocketIC integration tests use the
new install-pocketic input.

Also fix image variants: frontend-only examples (hosting/react, hosting/oisy-
signer-demo) now use the `all` image like the other hosting examples, instead of
the motoko image. Update workflow-template.yml to the caller pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…v-env-version

# Conflicts:
#	.github/workflows/vetkeys-password-manager-with-metadata.yml
@marc0olo marc0olo changed the title ci: centralize dev-env image version via reusable workflow ci: centralize dev-env image version + bump to 1.1.0 Jul 22, 2026
@marc0olo
marc0olo marked this pull request as ready for review July 22, 2026 13:41
@marc0olo
marc0olo requested a review from a team as a code owner July 22, 2026 13:41
@marc0olo
marc0olo requested a review from Copilot July 22, 2026 13:41

Copilot AI 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.

Pull request overview

This PR centralizes the ghcr.io/dfinity/icp-dev-env-* container image version used by CI into a single reusable workflow, bumps the dev-env version to 1.1.0, and adds a guard workflow to prevent the devcontainer and CI image versions from drifting.

Changes:

  • Introduces a reusable workflow (.github/workflows/_run-example.yml) as the single source of truth for the CI dev-env image tag (now 1.1.0) and optional PocketIC installation.
  • Converts many example workflows into thin callers of the reusable workflow (eliminating per-workflow hardcoded image tags).
  • Adds a version-drift check workflow and bumps the devcontainer image to 1.1.0; updates the workflow template to the new caller pattern.

Reviewed changes

Copilot reviewed 65 out of 65 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.devcontainer/devcontainer.json Bumps devcontainer image to icp-dev-env-all:1.1.0.
.github/workflows/_run-example.yml Adds reusable workflow; centralizes CI container tag at 1.1.0 and PocketIC install option.
.github/workflows/dev-env-version-check.yml Adds PR guard to ensure devcontainer and CI dev-env versions match.
.github/workflow-template.yml Updates template to use the reusable workflow caller pattern.
.github/workflows/backend_only.yml Switches to reusable workflow caller.
.github/workflows/backend_wasm64.yml Switches to reusable workflow caller.
.github/workflows/basic_ethereum.yml Switches to reusable workflow caller.
.github/workflows/canister-info.yml Switches to reusable workflow caller.
.github/workflows/canister-snapshot-download.yml Switches to reusable workflow caller.
.github/workflows/canister-snapshots.yml Switches to reusable workflow caller.
.github/workflows/canister_factory.yml Switches to reusable workflow caller.
.github/workflows/canister_logs.yml Switches to reusable workflow caller.
.github/workflows/candid_type_generation.yml Switches to reusable workflow caller.
.github/workflows/cert-var.yml Switches to reusable workflow caller.
.github/workflows/composite_query.yml Switches to reusable workflow caller.
.github/workflows/daily_planner.yml Switches to reusable workflow caller.
.github/workflows/evm_block_explorer.yml Switches to reusable workflow caller.
.github/workflows/exchange-rates.yml Switches to reusable workflow caller.
.github/workflows/face-recognition.yml Switches to reusable workflow caller.
.github/workflows/filevault.yml Switches to reusable workflow caller.
.github/workflows/flying_ninja.yml Switches to reusable workflow caller.
.github/workflows/guards.yml Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs.
.github/workflows/hello_cycles.yml Switches to reusable workflow caller.
.github/workflows/hello_world.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/hosting-godot-html5-template-example.yml Switches to reusable workflow caller.
.github/workflows/hosting-photo-storage-example.yml Switches to reusable workflow caller.
.github/workflows/hosting-static-website-example.yaml Switches to reusable workflow caller.
.github/workflows/hosting-unity-webgl-example.yaml Switches to reusable workflow caller.
.github/workflows/ic_pos.yml Switches to reusable workflow caller.
.github/workflows/icp_transfer.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/icrc2-swap.yml Switches to reusable workflow caller.
.github/workflows/image-classification.yml Switches to reusable workflow caller (keeps custom setup in run).
.github/workflows/inter-canister-calls.yml Switches to reusable workflow caller.
.github/workflows/llm_chatbot.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/low_wasm_memory.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/oisy_signer_demo.yml Switches to reusable workflow caller (uses all variant).
.github/workflows/parallel_calls.yml Switches all jobs to reusable workflow caller (including multi-subnet jobs).
.github/workflows/performance_counters.yml Switches to reusable workflow caller.
.github/workflows/periodic_tasks.yml Switches to reusable workflow caller.
.github/workflows/photo_gallery.yml Switches to reusable workflow caller.
.github/workflows/pub-sub.yml Switches to reusable workflow caller.
.github/workflows/qrcode.yml Switches to reusable workflow caller.
.github/workflows/query_stats.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/random_maze.yml Switches to reusable workflow caller.
.github/workflows/react.yml Switches to reusable workflow caller (uses all variant).
.github/workflows/receiving-icp.yml Switches to reusable workflow caller.
.github/workflows/send_http_get.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/send_http_post.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/simd.yml Switches to reusable workflow caller.
.github/workflows/stake_neuron_from_cli.yml Switches to reusable workflow caller.
.github/workflows/superheroes.yml Switches to reusable workflow caller.
.github/workflows/threshold-ecdsa.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/threshold-schnorr.yml Switches both Motoko and Rust jobs to reusable workflow caller; routes PocketIC via reusable workflow inputs.
.github/workflows/unity_ii_deeplink.yml Switches to reusable workflow caller.
.github/workflows/unit_testable_rust_canister.yml Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs.
.github/workflows/vetkeys-basic-bls-signing.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/vetkeys-basic-ibe.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/vetkeys-basic-timelock-ibe.yml Switches to reusable workflow caller.
.github/workflows/vetkeys-basic-vetkd.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/vetkeys-encrypted-notes-app-vetkd.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/vetkeys-password-manager-with-metadata.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/vetkeys-password-manager.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/wasm_counter.yml Switches to reusable workflow caller (uses all variant).
.github/workflows/who_am_i.yml Switches both Motoko and Rust jobs to reusable workflow caller.
.github/workflows/x509.yml Switches to reusable workflow caller; routes PocketIC via reusable workflow inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflow-template.yml
Comment thread .github/workflows/dev-env-version-check.yml Outdated
- workflow-template.yml: show the two-language (Motoko + Rust) form by default
  with one pull_request path entry per language, and document the single-language,
  frontend-only, and PocketIC variants. The previous single <working-dir>
  placeholder would have under-triggered a copied two-language workflow.
- dev-env-version-check.yml: anchor the version grep to the actual
  `container: ghcr.io/dfinity/icp-dev-env` line (first match) so a comment or
  example line can't be picked up by mistake.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@marc0olo

Copy link
Copy Markdown
Member Author

Thanks @Copilot — both points were fair and are addressed in 315dbbb:

  • workflow-template.yml paths: the template now shows the two-language (Motoko + Rust) form by default, with one pull_request path entry per language directory, and documents how to adapt it for single-language, frontend-only (language: all + hosting/<name>), and PocketIC cases. This removes the earlier mismatch where a copied two-language workflow would only trigger on one language directory.
  • dev-env-version-check.yml grep: the version is now extracted from the actual container: ghcr.io/dfinity/icp-dev-env line (first match, anchored to the key), so a comment or example line can't be matched by mistake. Verified it still resolves 1.1.0 on both sides.

Bump the pinned icp-dev-env image from 1.1.0 to the v-prefixed v1.2.0
tag in the two source-of-truth locations, and document the v-prefix
convention in AGENTS.md.

The registry publishes both `v1.2.0` and `1.2.0` tags (from
type=ref,event=tag and type=semver respectively); we pin the
v-prefixed form. dev-env-version-check.yml keeps devcontainer.json and
_run-example.yml in sync.

Awaiting dfinity/icp-dev-env#43 (the v1.2.0 release); CI will be red
until that image is published.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@marc0olo marc0olo changed the title ci: centralize dev-env image version + bump to 1.1.0 ci: centralize dev-env image version + bump to v1.2.0 Jul 23, 2026
@marc0olo
marc0olo merged commit cf1b1f8 into master Jul 23, 2026
92 of 178 checks passed
@marc0olo
marc0olo deleted the chore/centralize-dev-env-version branch July 23, 2026 23:12
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.

3 participants