Repository navigation
chore: remove redundant comments #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: validate | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| shellcheck: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - run: | | |
| sudo apt-get update && sudo apt-get install -y shellcheck | |
| shellcheck -S error build-image.sh customize.sh hardware-smoke-test.sh | |
| customize-in-container: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run customize.sh in an arm64 Trixie container and assert | |
| run: | | |
| docker run --rm -i -v "$PWD:/src" \ | |
| arm64v8/debian:trixie bash -euo pipefail <<'CONTAINER' | |
| apt-get update | |
| apt-get install -y --no-install-recommends curl ca-certificates iproute2 procps dbus | |
| mkdir -p /boot/firmware && : > /boot/firmware/config.txt | |
| # liblgpio-dev comes from Raspberry Pi OS and is unavailable in Debian. | |
| grep -vx 'liblgpio-dev' /src/packages.txt > /tmp/packages.txt | |
| install -d -m 700 /etc/NetworkManager/system-connections | |
| install -m 600 /src/files/dpea-eth0.nmconnection \ | |
| /etc/NetworkManager/system-connections/dpea-eth0.nmconnection | |
| # Reproduce replacement conflicts with the stock avahi package. | |
| apt-get install -y avahi-daemon libnss-mdns | |
| # Reproduce the conffile prompt caused by Raspberry Pi OS's modified config. | |
| echo "# dpea-ci: simulate a base-image modified conffile" >> /etc/avahi/avahi-daemon.conf | |
| bash /src/customize.sh | |
| echo "===== assertions =====" | |
| fail=0 | |
| command -v uv >/dev/null && echo "OK uv $(uv --version)" || { echo "FAIL uv"; fail=1; } | |
| dpkg -s avahi-dpea >/dev/null 2>&1 && echo "OK avahi-dpea installed" || { echo "FAIL avahi-dpea"; fail=1; } | |
| dpkg -S /usr/sbin/avahi-daemon 2>/dev/null | grep -q '^avahi-dpea:' \ | |
| && echo "OK /usr/sbin/avahi-daemon owned by avahi-dpea" \ | |
| || { echo "FAIL avahi-daemon binary not replaced by avahi-dpea"; fail=1; } | |
| for line in "dtparam=i2c_arm=on" "enable_uart=1" "dtoverlay=disable-bt"; do | |
| grep -qx "$line" /boot/firmware/config.txt && echo "OK config: $line" || { echo "FAIL config: $line"; fail=1; } | |
| done | |
| grep -qx "dtparam=spi=on" /boot/firmware/config.txt && { echo "FAIL config: spi should be off"; fail=1; } || echo "OK config: spi not enabled" | |
| test -L /etc/systemd/system/serial-getty@ttyAMA0.service && echo "OK serial getty masked" || { echo "FAIL serial getty not masked"; fail=1; } | |
| test -f /etc/NetworkManager/system-connections/dpea-eth0.nmconnection \ | |
| && echo "OK eth0 profile present" || { echo "FAIL eth0 profile"; fail=1; } | |
| (service dbus start >/dev/null 2>&1 || true; avahi-daemon -D >/dev/null 2>&1 || true; sleep 2) | |
| if ss -lun 2>/dev/null | grep -q ":5358"; then echo "OK avahi listening on 5358" | |
| else echo "WARN could not confirm 5358 in container (verify on hardware)"; fi | |
| exit $fail | |
| CONTAINER |