diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df3b2cb..ce5dff9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,48 @@ name: CI on: + workflow_dispatch: push: - branches: [main] + branches: [main, stackup] pull_request: - branches: [main] + branches: [main, stackup] jobs: + stackup-check: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Checkout Stackup KiCad plugin + uses: actions/checkout@v4 + with: + repository: stackup-eda/stackup + ref: v0.1.3 + path: stackup-tool + + - name: Install Rust 1.96 + run: rustup toolchain install 1.96.0 --profile minimal + + - name: Check Stackup design + run: cargo +1.96.0 run --locked --manifest-path ci/stackup/Cargo.toml -- check PCB/stackup/board.kdl --locked + + - name: Check purchasing BOM + run: cargo +1.96.0 run --locked --manifest-path ci/stackup/Cargo.toml -- bom PCB/stackup/board.kdl --locked -o /tmp/snips-bom.csv + + - name: Install KiCad 10 + run: | + sudo apt-get update + sudo apt-get install -y software-properties-common + sudo add-apt-repository --yes ppa:kicad/kicad-10.0-releases + sudo apt-get update + sudo apt-get install -y --install-recommends kicad + + - name: Check PCB sync + run: | + /usr/bin/python3 ci/check_pcb_sync.py PCB/snips_controller.kicad_pcb \ + --stackup ci/stackup/target/debug/snips-stackup-check \ + --plugin-dir stackup-tool/kicad-plugin + native-tests: runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 04e5d0f..c2ae4cc 100644 --- a/.gitignore +++ b/.gitignore @@ -66,4 +66,9 @@ PCB/production/misc/* # ERC report JSON scratch files (from kicad-cli sch erc) PCB/erc*.json -PCB/full_erc*.json \ No newline at end of file +PCB/full_erc*.json + +# Local Stackup library checkout for development +manifest.local.kdl +.stackup/ +ci/stackup/target/ diff --git a/CLAUDE.md b/CLAUDE.md index d0551e1..99f8cba 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,18 +23,18 @@ ``` 3. Once a PR lands, delete the local feature branch. This repo always squash or rebase merges — `main` never gets a merge commit for the PR, so `git branch -d` (and `--merged` checks) won't recognize the branch as merged even though its content has landed. Confirm via `git log --oneline` (look for the PR's commit/title on `main`) or `gh pr view --json state`, then use `git branch -D ` to remove it. -## BOM Value fields - -The fab's BOM shows only Designator, Footprint, Quantity and **Value** (never MF, MPN or LCSC), so every -component's Value is `