Skip to content

Migrate local pipeline + non-release CI from dfx to icp-cli#550

Open
Kamirus wants to merge 3 commits into
mainfrom
kamillistopad/lang-1311-migrate-non-release-ci-to-icp
Open

Migrate local pipeline + non-release CI from dfx to icp-cli#550
Kamirus wants to merge 3 commits into
mainfrom
kamillistopad/lang-1311-migrate-non-release-ci-to-icp

Conversation

@Kamirus

@Kamirus Kamirus commented May 22, 2026

Copy link
Copy Markdown
Collaborator

What changes for users

Mops contributors:

  • npm run replica, npm run deploy-local and npm start now use icp-cli + pocket-ic instead of dfx. Local dev requires npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm (Node-based install, see icp-cli quickstart).
  • ci.yml installs icp-cli alongside dfx and exercises the new local pipeline end-to-end.

What stays on dfx:

  • Production deploys: release.yml, npm run deploy-staging, npm run deploy-ic.
  • npm run decl:cli (dfx generate) — switching to icp-bindgen would generate a noisy churn diff in cli/declarations/; deferred.
  • mops-test.yml and setup-mops.yml matrices: they test against mops@1.0.0, which only supports pocket-ic 4.0.0 and so can't pick up a newer [toolchain].pocket-ic from this repo's mops.toml.
  • dfx.json is kept so the production paths and external mops users are unaffected.

End users of the ic-mops CLI itself: no change.

Why

Reduce internal coupling to dfx ahead of broader migration (LANG-1311). Picks the safe, low-blast-radius targets first (local dev + ci.yml) and leaves mainnet-touching paths and old-CLI matrices alone.

How it was validated

Locally exercised the full chain on macOS:

npm run replica         # icp network start, port 4943
npm run deploy-local    # icp deploy -y -e local main → .icp/cache/mappings/local.ids.json
npm run decl            # dfx generate main && dfx generate bench
npm run build-frontend  # vite build using new ids file

vite.config.ts reads the new flat icp ids map ({ name: id }) for local, with a fallback to .dfx/local/canister_ids.json so anyone still on the dfx pipeline locally is unaffected during the transition.

Notes

  • icp.yaml mirrors dfx.json; cli and play-frontend use raw build/sync steps because the asset-canister recipe template only supports a single dir.
  • An earlier attempt to also drop dfx from mops-test.yml via [toolchain].pocket-ic = "12.0.0" in root mops.toml failed CI: the matrix tests mops@1.0.0, which errors with "Current Mops CLI only supports pocket-ic 4.0.0". Reverted in a follow-up commit on this PR.

…-cli

Switch `npm run replica`/`deploy-local` and the corresponding ci.yml steps
to icp-cli + pocket-ic; mops-test.yml now relies on `[toolchain].pocket-ic`
in mops.toml instead of dfx. Production deploys (release.yml,
deploy-staging, deploy-ic) and `dfx generate` for declarations stay on dfx.

LANG-1311

Co-authored-by: Cursor <cursoragent@cursor.com>
@Kamirus Kamirus requested a review from a team as a code owner May 22, 2026 13:25
@github-actions

github-actions Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Cursor AI review

👍 APPROVE — looks safe to merge

Category Assessment Details
Summary Migrates contributor local dev and main CI deploy path from dfx to icp-cli while keeping production deploys and dfx generate on dfx.
Code Quality Focused diff: icp.yaml mirrors dfx.json, CI adds the missing npm run decl step, and vite.config.ts handles both ID file formats with fallback.
Consistency Scoped migration matches stated intent—local/deploy-local only; staging/IC/release paths and decl:cli stay on dfx.
Security CI permissions unchanged (contents: read); no auth, registry, or secrets handling changes.
Tests CI still exercises the full chain; adding decl after icp deploy correctly replaces declarations that dfx deploy used to produce implicitly.
Maintainability ⚠️ Dual dfx.json + icp.yaml config is intentional but adds sync burden; mitigated by comments in icp.yaml, ci.yml, and AGENTS.md.

Verdict

Decision: APPROVE
Risk: Low
Reason: This is a well-scoped contributor/CI migration with production paths untouched, a correct vite ID fallback, and a necessary CI decl step. No correctness or regression issues were found in the changed files relative to base.


Generated for commit 5a9448e

Kamirus and others added 2 commits May 22, 2026 15:26
mops 1.0.0 (tested by setup-mops.yml and mops-test.yml matrix) only
supports pocket-ic 4.0.0. Adding pocket-ic = 12.0.0 to root mops.toml
breaks 'mops test' for old CLIs in those matrices.

Keeps icp.yaml + ci.yml/package.json/vite migration; mops-test.yml
stays on dfx for now.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant