Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
95d13c5
Merged main with the location changes
mrosseel Mar 17, 2025
c872394
no ubx yet
mrosseel Mar 19, 2025
51f14f4
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Mar 25, 2025
0ec4de8
Revert "no ubx yet"
mrosseel Mar 25, 2025
bbcad5c
Merge remote-tracking branch 'origin/main'
mrosseel Mar 27, 2025
fd44825
ZMerge branch 'main' of github.com:mrosseel/PiFinder
mrosseel Apr 5, 2025
64f8401
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
b46636f
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
77f79bd
Merge remote-tracking branch 'origin/main'
mrosseel Apr 6, 2025
30fa0dc
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Jun 17, 2025
0a71bb5
Merge remote-tracking branch 'upstream'
mrosseel Jul 10, 2025
f4738fe
Merge remote-tracking branch 'upstream/main'
mrosseel Jul 28, 2025
9c508bc
Merge remote-tracking branch 'upstream/main'
mrosseel Sep 22, 2025
8da0875
Merge remote-tracking branch 'upstream/main'
mrosseel Nov 10, 2025
7f818bc
Merge branch 'main' of github.com:brickbots/PiFinder
mrosseel Nov 15, 2025
ee454f5
Merge remote-tracking branch 'upstream/main'
mrosseel Nov 16, 2025
b8d65d4
First version of the working deep chart feature
mrosseel Nov 21, 2025
f660fe5
Add healpy requirement
mrosseel Nov 21, 2025
8ed0c61
optimisations
mrosseel Nov 21, 2025
201b765
vectorize single
mrosseel Nov 21, 2025
05668bc
Performance and logging
mrosseel Nov 21, 2025
0d86a0f
LM entry and chart fixes
mrosseel Nov 22, 2025
7fbf991
Revert solver.py formatting changes that introduced UnboundLocalError
mrosseel Nov 22, 2025
48248ce
More logging
mrosseel Nov 22, 2025
75db432
fix logging issue
mrosseel Nov 22, 2025
e81320f
some yield issues
mrosseel Nov 22, 2025
3c2116f
More logging
mrosseel Nov 22, 2025
d4c7115
Fix images not yielding
mrosseel Nov 22, 2025
8c1099b
fix images not showing
mrosseel Nov 22, 2025
d678797
flag fix
mrosseel Nov 22, 2025
b1863d0
throwing things against the wall
mrosseel Nov 22, 2025
90e68ce
Speed up indexes
mrosseel Nov 22, 2025
bcddba6
lifted tile limit
mrosseel Nov 22, 2025
ea11bc9
Added bloom filters to speed up charts
mrosseel Nov 23, 2025
fa2560b
Compressed indexes and disabling bloom
mrosseel Nov 24, 2025
adec3f8
fixed healpix boundaries bug
mrosseel Nov 25, 2025
db71507
Working, pre-refactor commit
mrosseel Nov 26, 2025
3f51295
Refactoring
mrosseel Nov 27, 2025
3854d60
Refactored, using gaia consistently
mrosseel Dec 2, 2025
4c1c621
Merge remote-tracking branch 'upstream/main' into deepchart
mrosseel Dec 26, 2025
2add5f2
fix rotation
mrosseel Dec 26, 2025
6f7c860
Merge remote-tracking branch 'upstream/main' into deepchart
mrosseel Jan 18, 2026
cf19c10
Sqm improvements (#372)
mrosseel Jan 25, 2026
435ce3c
Adjust GPS antenna holder sizing
brickbots Jan 25, 2026
100fe52
Rework gpsd gps code to fix issue with early dongle which never repor…
brickbots Jan 25, 2026
c645928
Adding release notes
brickbots Jan 25, 2026
322b893
Remove reference to assembled kit version
brickbots Jan 26, 2026
3b0a9a2
feat: add CI/CD workflows for NixOS build and release
mrosseel Feb 4, 2026
f2c88e6
fix: add filesystem stub for CI closure builds
mrosseel Feb 4, 2026
0257842
fix: add pifinder.devMode option declaration
mrosseel Feb 4, 2026
a1ba877
fix: wrap services.nix config in explicit config block
mrosseel Feb 4, 2026
454726f
fix: add package hashes to python-env.nix
mrosseel Feb 4, 2026
10d0c33
feat: support self-hosted ARM64 runner for faster builds
mrosseel Feb 4, 2026
5b17091
fix: add device tree filter and fix PWM overlay syntax
mrosseel Feb 4, 2026
7292ac6
fix: add write permissions and self-hosted runner to release workflow
mrosseel Feb 5, 2026
9fcc29e
fix: use ubuntu-latest for all workflows, simplify QEMU setup
mrosseel Feb 5, 2026
7430061
fix: lint and type errors in sys_utils_nixos.py
mrosseel Feb 5, 2026
6000482
fix: swap noqa/type-ignore comment order for ruff
mrosseel Feb 5, 2026
001751d
fix: name SD image with version tag
mrosseel Feb 5, 2026
9c361a6
fix: add sys_utils_base.py to tracked files
mrosseel Feb 5, 2026
a2c0f9a
fix: NixOS netboot camera, sys_utils, and solver issues
mrosseel Feb 6, 2026
34dca88
feat: runtime camera selection via /boot/camera.txt for SD cards
mrosseel Feb 6, 2026
d12ca7a
feat(nixos): refactor sys_utils and add netboot deploy script
mrosseel Feb 7, 2026
2aa6e15
fix: misc UI, DB, and CI improvements
mrosseel Feb 7, 2026
d606d40
fix(netboot): improve NFS compatibility for Nix store
mrosseel Feb 9, 2026
63e727d
fix(deploy): add SSH keepalives and improve rsync transfer
mrosseel Feb 9, 2026
a919541
fix: move comet_file to writable data_dir
mrosseel Feb 9, 2026
dcb241a
fix(netboot): improve initrd network and add libcamera IPA path
mrosseel Feb 9, 2026
ddd3f97
fix: add missing PWM udev rule
mrosseel Feb 9, 2026
329d7c2
feat: add early boot LED indicator service
mrosseel Feb 9, 2026
04576e1
feat: add C boot splash with Knight Rider animation
mrosseel Feb 9, 2026
b3bd709
fix: make Knight Rider scanner brighter red
mrosseel Feb 9, 2026
91f926e
fix: stop boot-splash via ExecStartPre instead of conflicts
mrosseel Feb 9, 2026
9a70253
fix: minimize bootstrap closure size
mrosseel Feb 9, 2026
e78c47e
fix: strip more bloat from bootstrap
mrosseel Feb 9, 2026
371655a
fix: disable NetworkManager VPN plugins
mrosseel Feb 9, 2026
530717c
fix: swap type-ignore before noqa for mypy parsing
mrosseel Feb 9, 2026
75fdff8
fix: strip more bloat - disable xdg, fuse, perl deps
mrosseel Feb 9, 2026
0c4ef2e
fix: disable lesspipe (pulls perl 112MB)
mrosseel Feb 9, 2026
617d202
fix: replace NetworkManager with wpa_supplicant
mrosseel Feb 9, 2026
baf9d1b
fix: override NetworkManager to exclude openconnect
mrosseel Feb 9, 2026
c5eefd6
fix: remove invalid NetworkManager overlay
mrosseel Feb 9, 2026
b2c18c5
fix: use bare type: ignore for gi.repository import
mrosseel Feb 9, 2026
448e256
fix: override openconnect with dummy to remove GTK dep
mrosseel Feb 9, 2026
7c82e9a
fix: override modemmanager to remove 284MB cellular bloat
mrosseel Feb 9, 2026
4f7f816
revert: remove broken modemmanager override
mrosseel Feb 9, 2026
64669d2
feat: switch from NetworkManager to iwd + systemd-networkd
mrosseel Feb 9, 2026
c3eb187
fix: disable more documentation modules
mrosseel Feb 9, 2026
14f13f5
fix: mkForce systemPackages to exclude w3m from base profile
mrosseel Feb 9, 2026
b3ef9a6
fix: disable containers to remove perl (112MB)
mrosseel Feb 9, 2026
957b55e
fix: PWM overlay pinctrl and boot splash improvements
mrosseel Feb 9, 2026
f00b041
ci: use Pi5 native runner with ubuntu-latest fallback
mrosseel Feb 9, 2026
78c1eb9
fix(ci): use correct flake output names
mrosseel Feb 9, 2026
721e59b
fix: use /etc/static for symlinks in deploy script
mrosseel Feb 9, 2026
258a367
fix: use Type=simple for pifinder service
mrosseel Feb 9, 2026
bf4d561
fix: remove pam.d before symlink in deploy script
mrosseel Feb 9, 2026
59a146f
fix: point bootstrap flake to mrosseel/PiFinder/nixos
mrosseel Feb 9, 2026
791d99a
feat: centralize PiFinder repo URL in pifinder.repoUrl option
mrosseel Feb 9, 2026
c971bd2
ci: add bootstrap tarball build workflow
mrosseel Feb 9, 2026
f236d32
ci: trigger bootstrap build on push to nixos branch
mrosseel Feb 9, 2026
3d43eb3
fix(ci): find image file not directory
mrosseel Feb 9, 2026
86a9273
fix(ci): use sudo for tar and exclude lost+found
mrosseel Feb 9, 2026
34e412b
fix(ci): clean up leftover files from previous runs
mrosseel Feb 9, 2026
5e0ed42
feat: manifest-based software update UI with channels
mrosseel Feb 10, 2026
21c23c2
chore: add nix dev shell for local testing
mrosseel Feb 10, 2026
7334f30
feat: camera switching via NixOS specialisations
mrosseel Feb 10, 2026
7204b16
fix: use absolute path for sudo in sys_utils
mrosseel Feb 10, 2026
e8c6f2e
fix: use absolute paths for systemctl/journalctl in sys_utils
mrosseel Feb 10, 2026
6b69b89
feat: upgrade nixpkgs 24.11 → 25.11 (Python 3.13)
mrosseel Feb 10, 2026
6a81855
fix: u-boot boot chain, RPi.GPIO aarch64, I2C, sudo, /boot mount
mrosseel Feb 11, 2026
2007bda
perf: boot time optimizations and u-boot PCI/USB stripping
mrosseel Feb 11, 2026
4e67699
fix: bootstrap migration progress and nix fetch issues
mrosseel Feb 11, 2026
be3a4cc
feat: unified nix dev shell, pygame keyboard, software update UI
mrosseel Feb 11, 2026
7b78f40
fix: camera test mode, PAM auth, service PATH, AP networking
mrosseel Feb 11, 2026
1ac9d9b
feat: include catalog images in SD card image
mrosseel Feb 12, 2026
6e80659
feat: bootstrap migration tarball and pifinder-src optimization
mrosseel Feb 12, 2026
f804d57
refactor: remove bootstrapMode, use full system for migration tarball
mrosseel Feb 12, 2026
fdb9300
fix: keep welcome.png in pifinder-src (needed at runtime)
mrosseel Feb 12, 2026
57cf44c
feat: add nix-path-registration first-boot service
mrosseel Feb 12, 2026
3cd23c7
feat: store-path-based NixOS upgrade
mrosseel Feb 13, 2026
a883cd7
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
231b3ff
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
30194a0
fix: use nix build instead of nix copy --from in upgrade service
mrosseel Feb 13, 2026
c27ed16
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
5e642ce
style: apply ruff formatting to Python codebase
mrosseel Feb 13, 2026
5e75817
refactor: replace nox/pip with nix develop for CI and dev tooling
mrosseel Feb 13, 2026
676be12
fix: add watchdog fallback for CI when self-hosted runner unavailable
mrosseel Feb 13, 2026
204be3f
fix: add SSH port 22 to firewall allowedTCPPorts
mrosseel Feb 13, 2026
e817105
fix: open firewall for Samba, remove redundant SSH port
mrosseel Feb 13, 2026
c1d8e8c
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
bf0054a
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
c76fdcd
fix: clean stale avahi PID file before restart
mrosseel Feb 13, 2026
da85b86
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
8b60e3c
fix: disable Determinate Nix to avoid FlakeHub registration
mrosseel Feb 13, 2026
98cdafe
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
0359235
fix: harden avahi hostname handling and use display constants
mrosseel Feb 13, 2026
bb2b72e
fix: run switch-to-configuration in detached scope during upgrade
mrosseel Feb 13, 2026
1cffae1
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
ecf0c3d
fix: use restartIfChanged/stopIfChanged for upgrade service
mrosseel Feb 13, 2026
0fde64e
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
021667d
ci: add config key removal warning for PRs
mrosseel Feb 13, 2026
c183328
refactor: replace version.txt with pifinder-build.json
mrosseel Feb 13, 2026
c55bf84
refactor: remove unused update_needed function and tests
mrosseel Feb 13, 2026
3189497
ci: add concurrency group to prevent queued run pileup
mrosseel Feb 13, 2026
cba851a
feat: persist unstable channel unlock across restarts
mrosseel Feb 13, 2026
3bace42
chore: stamp build [skip ci]
github-actions[bot] Feb 13, 2026
b1e1e11
merge: integrate deepchart feature branch onto nixos
mrosseel Feb 14, 2026
94faa27
chore: stamp build [skip ci]
github-actions[bot] Feb 14, 2026
3b93ae3
feat: add Gaia star data to SD image and fix WiFi SSH
mrosseel Feb 14, 2026
4858066
fix: add healpy to Python packages for Gaia star catalog
mrosseel Feb 14, 2026
ac47269
feat: add upgrade progress UI with download tracking
mrosseel Feb 18, 2026
6253d7d
merge: nixos upgrade progress UI
mrosseel Feb 18, 2026
6a64841
feat: add upgrade progress UI with download tracking
mrosseel Feb 18, 2026
40d8bc8
chore: stamp build [skip ci]
github-actions[bot] Feb 18, 2026
b2ae89a
merge: sync with rebased nixos
mrosseel Feb 18, 2026
86712f4
fix: reorder imports in get_images.py for E402 lint compliance
mrosseel Feb 18, 2026
86baf8c
fix: use loose rpfilter for multi-interface WiFi+ethernet support
mrosseel Feb 19, 2026
922c1b6
fix: use loose rpfilter for multi-interface WiFi+ethernet support
mrosseel Feb 19, 2026
2d0ccdb
chore: stamp build [skip ci]
github-actions[bot] Feb 19, 2026
dedf478
fix: resolve mypy type errors
mrosseel Feb 19, 2026
33a1ac4
fix: resolve mypy type ignore issues for CI
mrosseel Feb 19, 2026
9c366c4
docs: add critical Pi 4 build limitations to CLAUDE.md
mrosseel Feb 19, 2026
49a2fc8
feat: add dev mode toggle and screen off burn-in protection
mrosseel Feb 19, 2026
d79c103
feat: add test mode toggle with visual feedback
mrosseel Feb 20, 2026
c1dc370
chore: stamp build [skip ci]
github-actions[bot] Feb 20, 2026
a6a8ef4
revert: remove test mode and dev mode features (moved to screensaver …
mrosseel Feb 20, 2026
97c9ce2
feat: auto-generate pifinder-build.json from git rev at nix build time
mrosseel Feb 21, 2026
4dee477
Merge branch 'nixos' into deepchart
mrosseel Feb 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .claude/settings.local.json

This file was deleted.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
117 changes: 117 additions & 0 deletions .github/workflows/bootstrap-tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Build Bootstrap Tarball

on:
push:
branches: [nixos]
paths:
- 'nixos/bootstrap.nix'
- 'flake.nix'
- '.github/workflows/bootstrap-tarball.yml'
workflow_dispatch:
inputs:
version:
description: "Version tag (e.g. 2.5.0)"
required: false
default: "2.5.0"
type: string

jobs:
build-bootstrap:
runs-on: [self-hosted, aarch64]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set version
run: |
if [ -n "${{ inputs.version }}" ]; then
echo "VERSION=${{ inputs.version }}" >> "$GITHUB_ENV"
else
echo "VERSION=2.5.0" >> "$GITHUB_ENV"
fi
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Setup Cachix
uses: cachix/cachix-action@v15
with:
name: pifinder
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build bootstrap SD image
run: |
nix build .#images.bootstrap --print-out-paths > /tmp/image_path
echo "IMAGE_PATH=$(cat /tmp/image_path)" >> "$GITHUB_ENV"
- name: Extract boot and rootfs
run: |
# Clean up any leftover from previous runs
sudo rm -rf /tmp/tarball-staging /tmp/bootstrap.img /mnt/boot /mnt/root
# The SD image output is a directory containing sd-image/*.img.zst
IMAGE_FILE=$(find "$IMAGE_PATH" -type f \( -name "*.img" -o -name "*.img.zst" \) | head -1)
echo "Found image: $IMAGE_FILE"
if [[ "${IMAGE_FILE}" == *.zst ]]; then
zstd -d "${IMAGE_FILE}" -o /tmp/bootstrap.img
else
cp "${IMAGE_FILE}" /tmp/bootstrap.img
fi
LOOP=$(sudo losetup --find --show --partscan /tmp/bootstrap.img)
echo "LOOP=${LOOP}" >> "$GITHUB_ENV"
sudo mkdir -p /mnt/boot /mnt/root
sudo mount "${LOOP}p1" /mnt/boot
sudo mount "${LOOP}p2" /mnt/root
mkdir -p /tmp/tarball-staging
sudo cp -a /mnt/boot /tmp/tarball-staging/boot
sudo cp -a /mnt/root /tmp/tarball-staging/rootfs
sudo umount /mnt/boot /mnt/root
sudo losetup -d "${LOOP}"
rm -f /tmp/bootstrap.img
- name: Create bootstrap tarball
run: |
TARBALL="pifinder-bootstrap-v${VERSION}.tar.gz"
# Clean up any leftover files from previous runs
sudo rm -rf /tmp/tarball-staging/manifest.json "/tmp/${TARBALL}" "/tmp/${TARBALL}.sha256"
cat > /tmp/tarball-staging/manifest.json <<EOF
{
"version": "$VERSION",
"type": "bootstrap",
"created": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
"boot_label": "FIRMWARE",
"root_label": "NIXOS_SD"
}
EOF
# Use sudo for tar since rootfs contains root-owned files
sudo tar -C /tmp/tarball-staging -czf "/tmp/${TARBALL}" \
--exclude='*/lost+found' \
boot rootfs manifest.json
sudo chown $USER "/tmp/${TARBALL}"
echo "TARBALL=/tmp/${TARBALL}" >> "$GITHUB_ENV"
echo "TARBALL_NAME=${TARBALL}" >> "$GITHUB_ENV"
sha256sum "/tmp/${TARBALL}" | awk '{print $1}' > "/tmp/${TARBALL}.sha256"
echo "SHA256=$(cat /tmp/${TARBALL}.sha256)" >> "$GITHUB_ENV"
ls -lh "/tmp/${TARBALL}"
- name: Upload tarball artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.TARBALL_NAME }}
path: |
${{ env.TARBALL }}
${{ env.TARBALL }}.sha256
155 changes: 155 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: Build PiFinder NixOS

on:
push:
branches: [main, nixos]
pull_request:
types: [labeled, synchronize, opened]
workflow_dispatch:

concurrency:
group: build-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true

jobs:
# Try Pi5 native build first (fast)
build-native:
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'preview') ||
contains(github.event.pull_request.labels.*.name, 'testable')
runs-on: [self-hosted, aarch64]
timeout-minutes: 30
outputs:
success: ${{ steps.build.outcome == 'success' }}
store_path: ${{ steps.push.outputs.store_path }}
steps:
- uses: actions/checkout@v4

- uses: cachix/cachix-action@v15
with:
name: pifinder
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Build NixOS system closure
id: build
run: |
nix build .#nixosConfigurations.pifinder.config.system.build.toplevel \
-L --no-link
- name: Push to Cachix
id: push
run: |
STORE_PATH=$(nix build .#nixosConfigurations.pifinder.config.system.build.toplevel \
--json | jq -r '.[].outputs.out')
echo "$STORE_PATH" | cachix push pifinder
echo "store_path=$STORE_PATH" >> "$GITHUB_OUTPUT"
# Wait up to 15 min for native builder, then decide on fallback
native-wait:
if: |
github.event_name == 'push' ||
github.event_name == 'workflow_dispatch' ||
contains(github.event.pull_request.labels.*.name, 'preview') ||
contains(github.event.pull_request.labels.*.name, 'testable')
runs-on: ubuntu-latest
timeout-minutes: 20
outputs:
need_emulated: ${{ steps.wait.outputs.need_emulated }}
steps:
- name: Wait for native build
id: wait
env:
GH_TOKEN: ${{ github.token }}
run: |
for i in $(seq 1 30); do
sleep 30
RESULT=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" \
--jq '.jobs[] | select(.name == "build-native") | .conclusion // "pending"' 2>/dev/null || echo "pending")
echo "Check $i/30: build-native=$RESULT"
if [ "$RESULT" = "success" ]; then
echo "need_emulated=false" >> "$GITHUB_OUTPUT"
exit 0
elif [ "$RESULT" = "failure" ] || [ "$RESULT" = "cancelled" ]; then
echo "need_emulated=true" >> "$GITHUB_OUTPUT"
exit 0
fi
done
echo "Native build not done after 15 min, falling back to emulated"
echo "need_emulated=true" >> "$GITHUB_OUTPUT"
# Fallback to QEMU emulation if Pi5 unavailable or slow
build-emulated:
needs: native-wait
if: needs.native-wait.outputs.need_emulated == 'true'
runs-on: ubuntu-latest
timeout-minutes: 360
outputs:
store_path: ${{ steps.push.outputs.store_path }}
steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
extra-platforms = aarch64-linux
extra-system-features = big-parallel
- uses: cachix/cachix-action@v15
with:
name: pifinder
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'

- name: Register QEMU binfmt for aarch64
run: sudo apt-get update && sudo apt-get install -y qemu-user-static

- name: Build NixOS system closure
run: |
nix build .#nixosConfigurations.pifinder.config.system.build.toplevel \
--system aarch64-linux \
-L --no-link
- name: Push to Cachix
id: push
run: |
STORE_PATH=$(nix build .#nixosConfigurations.pifinder.config.system.build.toplevel \
--system aarch64-linux \
--json | jq -r '.[].outputs.out')
echo "$STORE_PATH" | cachix push pifinder
echo "store_path=$STORE_PATH" >> "$GITHUB_OUTPUT"
# Commit pifinder-build.json with store path to the same branch
stamp-build:
needs: [build-native, build-emulated]
if: always() && (needs.build-native.result == 'success' || needs.build-emulated.result == 'success')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref || github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Write pifinder-build.json
run: |
STORE_PATH="${{ needs.build-native.outputs.store_path || needs.build-emulated.outputs.store_path }}"
BRANCH="${{ github.head_ref || github.ref_name }}"
SHORT_SHA=$(git rev-parse --short HEAD)
PR_NUMBER="${{ github.event.pull_request.number }}"
if [ -n "$PR_NUMBER" ]; then
VERSION="PR#${PR_NUMBER}-${SHORT_SHA}"
else
VERSION="${BRANCH}-${SHORT_SHA}"
fi
jq -n --arg sp "$STORE_PATH" --arg v "$VERSION" \
'{store_path: $sp, version: $v}' > pifinder-build.json
- name: Commit pifinder-build.json
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pifinder-build.json
git diff --staged --quiet || git commit -m "chore: stamp build [skip ci]"
git push
56 changes: 56 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Lint & Test
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: false
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Lint
run: nix develop --command bash -c "cd python && ruff check"
- name: Format check
run: nix develop --command bash -c "cd python && ruff format --check"
- name: Check for removed config keys
if: github.event_name == 'pull_request'
run: |
BASE_SHA="${{ github.event.pull_request.base.sha }}"
git show "$BASE_SHA:default_config.json" 2>/dev/null \
| python3 -c "import json,sys; print('\n'.join(sorted(json.load(sys.stdin).keys())))" \
> /tmp/base_keys.txt || exit 0
python3 -c "import json,sys; print('\n'.join(sorted(json.load(sys.stdin).keys())))" \
< default_config.json > /tmp/head_keys.txt
REMOVED=$(comm -23 /tmp/base_keys.txt /tmp/head_keys.txt)
if [ -n "$REMOVED" ]; then
while IFS= read -r key; do
echo "::warning file=default_config.json::Config key '$key' was removed — this may break user preferences across release switches"
done <<< "$REMOVED"
fi

type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: false
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Type check
run: nix develop --command bash -c "cd python && mypy --install-types --non-interactive ."

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: false
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Smoke tests
run: nix develop --command bash -c "cd python && pytest -m smoke"
- name: Unit tests
run: nix develop --command bash -c "cd python && pytest -m unit"
14 changes: 0 additions & 14 deletions .github/workflows/nox.yml

This file was deleted.

Loading
Loading