Files
hardware/.github/workflows/hardware.yml
T
Claude e9bc87fc5e CI: cache apt and Homebrew downloads
Package installs sometimes stall on GitHub's runners. A local action
(.github/actions/apt, and .github/actions/brew where macOS builds) caches
the downloaded packages, and apt's package lists with them, keyed on the
runner image and the package list. A cache hit installs offline; a miss
installs as before, with retries and timeouts, and saves the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUAp3wTZAV7UCEiC4S
2026-11-01 01:11:54 +00:00

49 lines
1.8 KiB
YAML

# SPDX-License-Identifier: CERN-OHL-S-2.0
# Copyright (C) 2026 D-Modem Authors
#
# For every board (the hood board, pico-serial W, Line and WB): the generated hardware
# files are up to date with the netlist script, the schematic passes ERC, and
# the PCB passes DRC and matches the schematic. (The PCBs aren't re-routed
# here: that needs Freerouting and takes minutes.)
name: hardware
on:
push:
paths: ["hardware/**", ".github/workflows/hardware.yml", ".github/actions/apt/**"]
pull_request:
paths: ["hardware/**", ".github/workflows/hardware.yml", ".github/actions/apt/**"]
jobs:
check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
# (apt's downloads cached: .github/actions/apt)
- name: KiCad 9
uses: ./.github/actions/apt
with:
ppa: ppa:kicad/kicad-9.0-releases
packages: kicad
- name: Netlists and schematics match the netlist script
run: |
for v in hood w line wb; do
python3 hardware/netlist/build_netlist.py --variant $v
python3 hardware/kicad/build_schematic.py --variant $v
done
python3 hardware/kicad/lib/make_footprints.py
git diff --exit-code -- hardware/netlist hardware/kicad firmware/src/generated
- name: ERC
run: |
for b in pico-serial pico-serial-w pico-serial-line pico-serial-wb; do
kicad-cli sch erc --severity-error --exit-code-violations -o erc.rpt hardware/kicad/$b.kicad_sch || { cat erc.rpt; exit 1; }
done
- name: DRC, and the PCBs match their schematics
run: |
for b in pico-serial pico-serial-w pico-serial-line pico-serial-wb; do
kicad-cli pcb drc --schematic-parity --severity-error --exit-code-violations -o drc.rpt hardware/kicad/$b.kicad_pcb || { cat drc.rpt; exit 1; }
done