Commit Graph

111 Commits

Author SHA1 Message Date
Akhil Velagapudi 22b2e561d3 Add structured KiCad symbol metadata tools (#577)
* Add structured KiCad symbol metadata tools

* Bump hyperfine

* Address PR comments

* kicad metadata: enforce invariants and dedup mcp schemas

* Address PR comments
2026-02-26 11:01:24 -05:00
Akhil Velagapudi 4a415593ef Add a Rust setup step to cargo-dist release (#535)
Previously, we assumed some cargo/rust version was pre-installed in the
runner and we'd just use that. We should instead respect
rust-toolchain.toml.
2026-02-12 20:49:39 +00:00
Akhil Velagapudi cc012796c5 Use single label matcher for windows runner (#534)
cargo-dist doesn't support multiple labels.
2026-02-12 12:04:37 -05:00
Akhil Velagapudi b0fc43ecf3 Use nextest in CI (#532) 2026-02-12 03:31:02 +00:00
Akhil Velagapudi 63c66ba266 Use self-hosted windows runner (#531)
* Use self-hosted windows runner

* Don't cache KiCad on Windows
2026-02-12 03:04:54 +00:00
Akhil Velagapudi bfeea4c25b Do proper workspace scaffolding on pcb import (#526)
* Do proper workspace scaffolding on `pcb import`

* Address PR comments
2026-02-11 13:53:13 -05:00
Akhil Velagapudi 6ae4aa1abd Add pcb import tests (#523)
* Add `pcb import` tests

* Don't block ERC/DRC issues on `pcb import`

* Build before layout
2026-02-10 22:09:17 -05:00
Akhil Velagapudi 0e54e3ec49 Move e2e tests to a separate workflow (#522) 2026-02-10 23:57:42 +00:00
Akhil Velagapudi 242453dc65 Fix npm publish
See https://github.com/diodeinc/pcb/actions/runs/21613656774/job/62291932720

> Error verifying sigstore provenance bundle: Unsupported GitHub Actions runner environment: "self-hosted". Only "github-hosted" runners are supported when publishing with provenance.
2026-02-03 17:08:21 -05:00
Akhil Velagapudi 0f8ec4b38e GitHub managed -> ubicloud runners (#488) 2026-02-02 16:36:26 -05:00
Akhil Velagapudi 660312dd97 Implement lens-based layout synchronization with hierarchical placement (#474)
* Implement lens-based layout synchronization with hierarchical placement

* Fix CI

* Use stdlib in layout tests

* Preserve group fragments

* Remove AdaptTracking

* Remove unused APIs

* Remove Board, use BoardView and BoardComplement directly

* Add ruff linting + formatting

* Nuke vdom

* Remove groups_registry arg to apply_changeset

* Fix netclass str name cast

* Fix entity ids

* Convert orphan nets to no-nets

* Remove noisy oplogs

* Fix kicad 9.x api warnings

* Fix ruff fmt

* Fix placement fallback bug

* Add unmanaged footprint diagnostics

* Skip kicad internal groups

* Fix fab layer visibility

* Update diagnostics

* Replace assertions with diagnostics

* Fallback to hierplace if fragment not found

* Make snapshots stable

* Make hier place more hierarchy

* Unified placement logic

* GUT placement

* Fix stale swig handle issue

* debug

* Support old boards without paths

* Fix existing bbox computation

* Fail fast

* Address PR comments
2026-01-31 17:44:40 -05:00
Akhil Velagapudi 3928a0bfad pcb publish --board (#467)
* Add `pcb publish --board`

* Prompt for version to bump

* `pcb tag` + `pcb release` -> `pcb publish --board`

* Support non-interactive `pcb publish`

* Update snapshot tests

* Hide `--force` in `pcb publish`

* Update changelog

* Update e2e test

* Fix tests

* Fix lints

* Upload release api server on publish

* Fetch remote tags first

* Address PR comments
2026-01-26 11:18:03 -05:00
Akhil Velagapudi 1431874b77 Hyperfinify to reduce noise (#453) 2026-01-20 14:27:22 -05:00
Akhil Velagapudi 3f449d8916 Add pcb-zen-wasi.wasm to release (#450)
* Add pcb-zen-wasi.wasm to release

* Remove pcb-docgen API

This has since been integrated into `pcb doc`.

* Make the global runner biggy
2026-01-20 02:28:02 +00:00
Akhil Velagapudi d4e4291a85 ENG-175: standardize path handling (#444)
* `pcb bom` now accepts a directory path

This is consistent with the other pcb subcommands.

* Revert "`pcb bom` now accepts a directory path"

This reverts commit 3d1d7d8b8312438b30f4fb091bc782718c5e3cc6.

* ENG-175: standardize path handling

* Update CHANGELOG

* Fix release test

* Fix review comments
2026-01-19 18:57:15 +00:00
Lenny Khazan f78bb18c1b Make pcb build fast again (#436)
* Add tracing

* Lazy symbol loading

* Parallel eval

* fix symbol inheritance

* fix net id collision

* update tests

* EvalConfig

* edge case fixes

* Add perf tracking

* tweak workflow

* fix cargo cache

* improve tracing

* dependency resolution tracing and optim

* Improve lock contention

* Remove needless module tree copy and file i/o

* More lock contention fixes

* Use mimalloc by default

* use cache for positions

* More micro-optimizations

* LSP improvements

* Add SD

* more runs

* Split up EvalSessionInner locks

* Remove unused allocators

* sqlite connection pool
2026-01-18 01:00:38 -05:00
Akhil Velagapudi 7f16968859 Add pcb run add-skill (#438)
* Add `pcb run add-skill`

* Fix symlink test
2026-01-16 12:53:27 -05:00
Akhil Velagapudi e42613e8ef Add .agents/skills/pcb/ on pcb new --workspace (#417)
* Add `.agents/skills/pcb/` on `pcb new --workspace`

* Symlink .agents -> .claude

* Add pcb new e2e test
2026-01-12 20:31:28 -05:00
Akhil Velagapudi ccb6a3f7fb Add IPC-2581 html file to release (#410)
* Add stackup to pcb ipc2581 info

* Add html export to pcb ipc2581

* Add IPC-2581 HTML export to release

* Address PR comments
2026-01-11 19:16:18 +00:00
Akhil Velagapudi d4d417823a Stable layout footprint paths (#398)
* Delete <workspace>/.pcb/cache symlinking for v1 dep resolution

* Symlink ~/.pcb/cache to workspace/.pcb/cache

Results in more stable fp-lib-table

* Patch fp-lib-table to point to vendor/ in release

* Run DRC on staged source layout directory

* Use source layout directly in release instead of separate copy

* Update tests, fix snapshots

* Run layout before release

* Dont ignore test

* Migrate test-workspaces/with-pcb-toml to v2

* Skip symlinks in release zip creation

* Buffer zip write

* Skip availability hydration on un-auth'd pcb bom

* Share cache directory for v2

* Update changelog
2026-01-09 17:43:57 -05:00
Akhil Velagapudi bcad20230b Bump kicad to 9.0.7 (#399)
* Bump kicad to 9.0.7

* Update layout snapshots
2026-01-08 14:45:20 -05:00
Akhil Velagapudi a1fbe4e30b Add CHANGELOG + maintenance scripts (#386)
* Add changelog

* Add some changelog scripts
2026-01-06 11:59:52 -05:00
Lenny Khazan 8e455f1d7f Add ty (#370)
* Add ty

* install uv
2025-12-19 18:03:49 -05:00
Akhil Velagapudi 28d539bfbc Use PAT 2025-12-19 16:54:16 -05:00
Akhil Velagapudi 3de81c4239 Reduce stdlib-version-check cron freq to once a day (#360)
* Use repo-specific GITHUB_TOKEN token

More secure, and has enough permissions.

* Reduce stdlib-version-check cron freq to once a day

The stdlib -> pcb dispatch workflow actually works. So the cron job is
only needed as a fallback in case the dispatch fails due to some github
outage (which is unfortunately very likely). But once a day should still
be enough.
2025-12-16 09:37:26 -05:00
Akhil Velagapudi d58dab9cfc Add bump-stdlib-version, bump stdlib (#355)
* Add bump-stdlib-version

* Add hourly stdlib version bumper
2025-12-16 01:04:11 +00:00
Akhil Velagapudi f9640e9bad Bump node version 2025-12-10 22:48:41 -05:00
Akhil Velagapudi aa9881f37e Fix npm publish (#347) 2025-12-10 22:34:50 -05:00
Akhil Velagapudi 4473c3d348 Build using wasm-pack, publish to npm (#346) 2025-12-10 21:36:08 -05:00
Akhil Velagapudi d3674668df Fix Windows flakiness by improving SQLite concurrency handling (#331)
* Use pcb build <path/to/dir> in CI

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Fix Windows flakiness by improving SQLite concurrency handling

Assets are indexed in parallel using par_iter(), which causes multiple threads
to access the SQLite cache index simultaneously. On Windows, this was causing
intermittent "Missing cache entry" failures.

Windows has more aggressive file locking than Unix. SQLite's default journal
mode uses exclusive file locks that cause immediate SQLITE_BUSY errors under
contention, whereas Unix handles this more gracefully via fcntl().

Changes:
- Enable WAL (Write-Ahead Logging) mode for better concurrent access
- Add 5-second busy timeout so SQLite retries instead of failing immediately

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Don't respect global templates for machine-managed cache directories

This slightly improves checkout performance

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-12-07 13:48:15 -05:00
Akhil Velagapudi ac3f121642 v2 dependency management (#312)
* Add toolchain packaging v2 doc

* Add v2 pcb.toml config

* Add v2 test workspaces

* Add v2 resolve hook

* Dep resolution - wip 1

* Implement full, transitive dep resolution

* Replace chrono with jiff

Fix a sparse checkout issue.

* Phase 3: fetch dependency contents after resolution

* Phase 4: write pcb.sum

* Store hashes in marker file

* Pre-seed pcb.sum and use it to optimize dep resolution

* Fix canonical tar issue, add pcb package for debugging purposes

* v1 to v2 live manifest translation

* Only collect package .zen files in v2

* v2 dep resolution

* Fix clippy lints

* Filter v2 build paths correctly

* Prune nested packages for content tar hash

* Split v2 resolution

* Removed global local_path_deps map

* Add sparse checkout of subdirs

* Drop support for workspace dependencies

* Add, validate package.path

* Auto resolve workspace members

* wip - no aliases

* Remove workspace.aliases support

* Add asset dependencies

* Don't preseed asset dependencies

* Add back aliases

* Remove unnecessary checks

* Auto alias from deps, add workspace.path

* Move resolver version and pcb-version to workspace config

* Don't preseed pcb.sum into MVS

* Split workspace.path into workspace.repository, workspace.path

* migrate - wip1

* Auto add deps to pcb.toml on build

* migrate - wip2

* migrate - wip3

* migrate - wip4

* Use sorted dependencies, assets, patch

* Use tags to auto-choose version

* Add pcb info v2 support

* pcb build always fixes local versions

* Improve workspace package detection

* process dirs by depth

* Add unpublished, dirty package detection

* pcb publish - wip1

* Make pcb info, pcb publish fast

* wave publishing

* Update docs on pcb publish

* Don't require main to be in sync for publish

* wave publish w/ commits

* Better commit messages

* Fix wave publish when no changes

* Compute publish content hashes in parallel

* Point to proper repos

Add --force to publish

* Skip vendor/ in migrate/

* Delete unused test workspaces

* Dedup skip_vendor

* Expand "@registry" in migrate

* Add auto dep for remote dependencies

* Simplify remote discovery

* Add registry path corrections

* Add another correction

* Combine phases 1 and 3

* Parallelize dep fetching using waves

* Fix pruning of nested packages

* Canonical hashing fixes

* Only include files in canonical tar

* Improve is_v2() detection

* Better integrate v2 migration into codemods

* Consolidate git commands to git.rs

* Update unstable ref snapshots

* Remove unstable ref tests

* simplify

* Remove secondary pass

* Standardize on members

* simplify

* Correct everything into workspace info

* Add cache_base()

* Factor out canonical

* Dedup canonical tar gen

* Consolidate workspace info types

* Remove intermediate states

* Compute dirty state on demand

* Update doc

* Add v2 vendor support

* Auto vendor on pcb build

* Add proper offline support for v2

* Fix pcb vendor

* Bump pcb version to 0.3.0

* Drop workspace.resolver, just use workspace.pcb-version

* Convert non-zen paths in escape_paths codemod

* Create modules for graphics/ during pcb migrate

* Replace cache marker files with sqlite index

* Vendor assets as .tar.zst files

* Add v2 release support

* revert d8e8842

* Auto dep subpaths of assets

* Use vendor_deps in pcb release

* Copy from workspace vendor/ opportunistically

* Default v2 manifest to vendor registry

* Fix tests, add inline pcb.toml support

* Update packaging doc

* Fix tests

* HTTP archive download support for package fetching

* Fetch assets in parallel

Preseed download wave 1 with pcb.sum

* Add snapshot tests for canonicalization

* Build before publish

* Fix stdout, add bom, layout support

* Add snapshot tests for auto-dep

* Add interactive version selector to pcb publish/update

* Cleanup

* Always run tidy on --tidy

* Add a versioning page to docs site

* Add workspace.exclude support

* Auto dep should respsect workspace packages

* Filter v2 zen files to member packages

* Fix tests, lsp, pcb open

* Update pcb zen wasm

* Fix single file subpath canonical tar hashing

* Fix diagnostic crash

* Fix wasm asset paths

* Allow omitting path in pcb vendor

Default to current dir.

* Add context to errors

* Opportunistically verity paths on auto-dep

* Fix clippy lints
2025-12-03 17:17:29 -05:00
Akhil Velagapudi c84a6bacb3 Split CI into separate lint and test jobs (#316)
Surface common CI failure modes much faster. Also, no need to run lint
checks on every platform.
2025-12-02 11:49:58 -05:00
Diode Robot 76a536aec8 Fetch bom availability by default (#309)
Replace `--availability` with `--offline`.

Co-authored-by: akhilles <akhilvelagapudi@gmail.com>
2025-11-21 10:59:32 -05:00
Akhil Velagapudi aaf1206d6e Run KiCad DRC checks during release (#270)
* Run KiCad DRC checks

* Fix snapshot test failure

* Fix "Test CLI (E2E)"
2025-11-04 22:20:34 -05:00
Akhil Velagapudi 680373c88b Fix wasm build regression (#254)
My last PR added a transitive dependency on pcb-kicad to pcb-zen-wasm,
which caused the wasm build to fail.

Build wasm bundle in CI to prevent future regressions.
2025-10-30 00:27:39 -04:00
Akhil Velagapudi 22ea42fff5 Bump kicad to 9.0.5 (#225)
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-10-10 14:35:02 -04:00
Akhil Velagapudi 461d30b3f2 Add a workflow for bumping version (#216)
Use this instead of the "pcb-tag-release" script.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-10-06 10:28:40 -04:00
Akhil Velagapudi 304551b1db Add better error messages, update blinky.zen (and add it to CI) (#212)
* Improve pcb layout error messages

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Update blinky code to use versioned stdlib, board config

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Keep examples/blinky.zen in sync with README.md blinky

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Build all examples in CI

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Build all examples

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-10-05 00:27:42 -04:00
Akhil Velagapudi 5aff6c7e45 Use mirrored kicad image (#187)
* Use mirrored kicad image

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add comment for how to sync

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-25 17:32:25 -04:00
Akhil Velagapudi 71984e70af Try ubicloud runners (#185)
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-25 15:53:51 -04:00
Akhil Velagapudi 49163707bc Bump dist, drop brew, npm support (#183)
* Bump dist, drop brew, npm support

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Use large runners

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-25 13:57:06 -04:00
Akhil Velagapudi acac11ae21 Re-tag "latest" on push to main (#171)
Currently, we only delete + push the release. But the release still points to the old tag.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-22 09:51:53 -04:00
Akhil Velagapudi 142256987f Publish pcb cli from main (#167)
Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-19 16:42:02 -04:00
Akhil Velagapudi dbc3ab31e6 Make pcb tag and pcb release consistent (#139)
* Make pcb tag and pcb release consistent

Before:
  pcb tag --board <BOARD> --version <VERSION> [PATH]
  pcb release <zen_path>  # inconsistent - used file path

After:
  pcb tag --board <BOARD> --version <VERSION> [PATH]
  pcb release --board <BOARD> [PATH]  # now consistent

Also, prefix the board name so that the folders + zip file names are
easier to grok.

Before:
  - Staging: .pcb/releases/MyBoard/v1.0.0/
  - Zip: .pcb/releases/MyBoard/v1.0.0.zip (just v1.0.0.zip, not MyBoard.v1.0.0.zip)

After:
  - Staging: .pcb/releases/MyBoard-v1.0.0/
  - Zip: .pcb/releases/MyBoard-v1.0.0.zip

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add find_board_by_name method

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Only print structured data to stdout

Only print json if -f json. Print human-friendly table otherwise.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-09-05 22:44:14 -04:00
Davide Asnaghi 8e6a63deb4 [FEATURE] sync zones and graphics (#79)
* sync zones and text

* add initial test for zone sync

* add zones to groups

* simpler zone test

* fix zone sync

* fix net determinism

* add more interesting test

* hack: amend tests with (0,0) positioning for now

* wip: fix nets for zones

* hack: keep old tests to make sure we don't mess up

* add zone sync

* fix sync graphics

* add complex test

* deterministic snapshot

* fix snapshots with no files

* add graphics test

* add timout

* bump timout

* reduce complexity

* move methods to virtual item

* add graphics groups

* use Duplicate

* add hatching to complex test
2025-08-24 01:29:00 -04:00
Akhil Velagapudi deec05e184 Remove invalid workflow file (#99)
It's causing a bunch of noise in Actions.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-21 14:53:48 -07:00
Akhil Velagapudi eedba95d7d Use smart rust cache (#98)
* Use smart rust cache

Out cache sizes are blowing up:

Cache Size: ~8914 MB (9346691088 B)
"C:\Program Files\Git\usr\bin\tar.exe" -xf C:/a/_temp/277318a1-9141-472d-bf1b-4d0461835b0b/cache.tzst -P -C C:/a/pcb/pcb --force-local --use-compress-program "zstd -d"
Cache restored successfully
Cache restored from key: Windows-cargo-02b001115c33129b2426bd7db7faa11329497685bfa1d1e328c20e41bc781dca

Which is slowing down builds. Just fetching cargo cache took 6 mins.

Swatinem/rust-cache has much better default behavior:
- Cleans dependencies no longer used
- Cleans incremental build artifacts
- Cleans anything older than 1 week

It also only caches dependencies (and their built artifacts). Caching
workspace crates is not that useful.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Reuse build pcb for stdlib testing

Also use actions/checkout for faster cloning.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-21 14:37:50 -07:00
Akhil Velagapudi 9a1930c2c5 pcb cli-level testing (#96)
* Add sandbox

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add dir snapshotting

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add branch support, snapshot_dir

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add snapshot testing of stdout/stderr

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Only use local files for workspace root detection

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add bom, release tests

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add pcb vendor snapshot test

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Sanitize linux tmp dir paths

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Ignore some tests on Windows

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Reuse dep fetching code from pcb-zen

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Fix download race condition

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Bump lock file

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Specify default branch

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Suppress 3d export logs to stdout

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-21 13:52:38 -07:00
Akhil Velagapudi 1df8194abf Switch to larger github runners (#90)
* Switch to larger github runners

The "xlarge" in "macos-15-xlarge" doesn't actually mean extra large. The
"x" indicates arm64 as opposed to Intel.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Remove dep on deprecated actions-rs/toolchain@v1

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-19 18:50:50 -07:00
Akhil Velagapudi 58549fb924 [DIO-301] Add pcb vendor, pcb build --offline (#72)
* Update Cargo.lock

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Add pcb vendor

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Copy pcb.toml to release if it exists

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Use vendor dir in resolver

Add --offline support to build, layout.
Standardize behavior of find_workspace_root. Most of the callsites would
fallback on parent dir of target .zen file. We should just do that
universally to reduce conditional code paths.

Add an option to the resolve to not use the vendor dir in case that's
useful in some cases.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Drop vendor alias

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Only support pcb vendor in pcb.toml workspaces

Attempting to resolve a common workspace root from multiple zen files in
a dir without pcb.toml just got way too complicated. We can add support
for this in the future if needed.

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

* Canonicalize zen_path

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>

---------

Signed-off-by: akhilles <akhilvelagapudi@gmail.com>
2025-08-15 12:07:51 -07:00