From 91ec0a2699372560043cf286d4b5a565d3c81435 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 14:02:53 -0800 Subject: [PATCH 1/6] Setup github actions. --- .cppcheck-suppressions | 40 ---------------- .github/workflows/README.md | 93 +++++++++++++++++++++++++++++++++++++ .github/workflows/build.yml | 70 ++++++++++++++++++++++++++++ .github/workflows/qa.yml | 67 ++++++++++++++++++++++++++ 4 files changed, 230 insertions(+), 40 deletions(-) create mode 100644 .github/workflows/README.md create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/qa.yml diff --git a/.cppcheck-suppressions b/.cppcheck-suppressions index 534e727c..24bf4f84 100644 --- a/.cppcheck-suppressions +++ b/.cppcheck-suppressions @@ -1,71 +1,31 @@ -# Suppressions for cppcheck -# -# Strategy: -# - workspace/all/ (platform-independent): Fully cleaned, zero style warnings -# - Device-specific code: Targeted style suppressions to maintain original style -# - Real bugs: Always fixed, never suppressed -# -# All suppressions are documented with rationale - -# Infrastructure noise - not actionable missingIncludeSystem unmatchedSuppression unusedFunction normalCheckLevelMaxBranches - -# Platform-specific code that looks wrong but isn't ConfigurationNotChecked unknownMacro:*PLATFORM* unknownMacro:*PAKS_PATH* unknownMacro:*SYSTEM_PATH* unknownMacro:*USERDATA_PATH* - -# SDL and libretro headers we don't control missingInclude:*/SDL* missingInclude:*/libretro* - -# Third-party code we don't maintain (libretro-common) *:*/libretro-common/* - -# Inline assembly - cppcheck doesn't understand dst parameters are modified constParameterPointer:*/scaler.c:723 constParameterPointer:*/scaler.c:3204 constParameterPointer:*/scaler.c:3290 constParameterPointer:*/scaler.c:3368 constParameterPointer:*/scaler.c:3456 - -# Thread callback function signatures - pthread_create requires specific signature -# Adding const would require function pointer casts, reducing readability constParameterCallback - -# Fallback implementations - conditions are always false in base implementation -# Platform-specific implementations may override these knownConditionTrueFalse:*/api.c:1444 knownConditionTrueFalse:*/api.c:1449 - -# Void pointer arithmetic - GCC extension used throughout codebase -# This is intentional and works correctly on all target platforms (ARM/GCC) -# Suppressing to avoid noise and maintain original code style arithOperationsOnVoidPointer - -# Cppcheck false positives from ifdef/macro confusion on void functions missingReturn:*/trimuismart/platform/platform.c:81 missingReturn:*/my282/overclock/overclock.c:811 - -# Variable shadowing - intentional loop-local variables in nested loops -# Maintains code clarity by keeping variable names consistent across loop iterations shadowVariable - -# Const-correctness style warnings - suppressed globally after manual review -# workspace/all/ was thoroughly cleaned (110 issues fixed) -# Device-specific code uses these patterns intentionally -# These are style-only, not bugs constParameterPointer constParameter constVariablePointer constVariable variableScope unusedStructMember - -# False positive - condition depends on runtime values knownConditionTrueFalse:*/my282/libmstick/mstick.c:228 diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 00000000..2b0fe34c --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,93 @@ +# GitHub Actions CI Workflows + +This directory contains the continuous integration workflows for MinUI. + +## Workflows + +### Quality Assurance (`qa.yml`) + +Runs on every push and pull request to `main`, `develop`, and `ci` branches. + +**Jobs:** +- **Unit Tests** - Runs comprehensive test suite in Debian Buster ARM64 Docker container +- **Static Analysis** - cppcheck on workspace/all/ (platform-independent code) +- **Code Formatting** - Validates code formatting with clang-format +- **Shell Script Linting** - shellcheck on all shell scripts + +All QA jobs run on standard `ubuntu-latest` runners. + +### Platform Builds (`build.yml`) + +Validates that builds work for multiple platforms. + +**Default platforms tested on every PR:** +- miyoomini (Miyoo Mini) +- trimuismart (Trimui Smart) +- rg35xxplus (Anbernic RG35XX Plus) + +**Workflow dispatch:** +Can manually trigger builds for specific platforms or all platforms using the "Run workflow" button in GitHub Actions. + +**Artifacts:** +Build artifacts are uploaded and retained for 7 days for testing. + +## Running Workflows Locally + +### QA Checks + +You can run the same QA checks locally that run in CI: + +```bash +# Run all tests (uses Docker) +make test + +# Run static analysis +make lint + +# Check code formatting +make format-check + +# Lint shell scripts +make -f Makefile.qa lint-shell +``` + +### Platform Builds + +```bash +# Build for a specific platform +make PLATFORM=miyoomini build +make PLATFORM=miyoomini system +make PLATFORM=miyoomini cores + +# Build everything for all platforms +make all +``` + +## Status Badges + +Add to README.md: + +```markdown +[![QA](https://github.com/nchapman/MinUI/actions/workflows/qa.yml/badge.svg)](https://github.com/nchapman/MinUI/actions/workflows/qa.yml) +[![Build](https://github.com/nchapman/MinUI/actions/workflows/build.yml/badge.svg)](https://github.com/nchapman/MinUI/actions/workflows/build.yml) +``` + +## Future Enhancements + +### ARM64 Runners + +GitHub now supports ARM64 runners which could significantly speed up builds since MinUI compiles for ARM devices. To use ARM64 runners: + +1. Enable ARM64 runners in repository settings +2. Update workflow files to use `runs-on: [self-hosted, linux, arm64]` or `runs-on: ubuntu-24.04-arm64` (when available) + +See: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/ + +### Additional Checks + +Consider adding: +- Release builds on tags +- Automated deployment of release artifacts +- Code coverage reporting +- Performance benchmarks +- Cross-platform build matrix (all 12+ platforms) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..8c90260c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,70 @@ +name: Platform Builds + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + workflow_dispatch: + inputs: + platforms: + description: 'Platforms to build (space-separated, or "all")' + required: false + default: 'miyoomini trimuismart rg35xxplus' + +jobs: + build: + name: Build ${{ matrix.platform }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + platform: + - miyoomini + - trimuismart + - rg35xxplus + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build platform ${{ matrix.platform }} + run: make PLATFORM=${{ matrix.platform }} build + + - name: Copy system files + run: make PLATFORM=${{ matrix.platform }} system + + - name: Build cores + run: make PLATFORM=${{ matrix.platform }} cores + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: minui-${{ matrix.platform }}-${{ github.sha }} + path: build/ + retention-days: 7 + + build-all: + name: Build All Platforms + runs-on: ubuntu-latest + if: github.event_name == 'workflow_dispatch' && github.event.inputs.platforms == 'all' + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build all platforms + run: make all + + - name: Upload all artifacts + uses: actions/upload-artifact@v4 + with: + name: minui-all-platforms-${{ github.sha }} + path: releases/ + retention-days: 7 diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml new file mode 100644 index 00000000..74fedc19 --- /dev/null +++ b/.github/workflows/qa.yml @@ -0,0 +1,67 @@ +name: Quality Assurance + +on: + push: + branches: [main, develop] + pull_request: + branches: [main, develop] + +jobs: + test: + name: Unit Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build test Docker image + run: make -f Makefile.qa docker-build + + - name: Run unit tests + run: make -f Makefile.qa docker-test + + lint: + name: Static Analysis + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install cppcheck + run: sudo apt-get update && sudo apt-get install -y cppcheck + + - name: Run static analysis on workspace/all/ + run: make -f Makefile.qa lint + + format: + name: Code Formatting + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install clang-format + run: sudo apt-get update && sudo apt-get install -y clang-format + + - name: Check code formatting + run: make -f Makefile.qa format-check + + shellcheck: + name: Shell Script Linting + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install shellcheck + run: sudo apt-get update && sudo apt-get install -y shellcheck + + - name: Run shellcheck + run: make -f Makefile.qa lint-shell From eaa7efbc0e60e8495bff63383cef185c4b527695 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 14:06:41 -0800 Subject: [PATCH 2/6] Fix unit test action. --- .github/workflows/README.md | 4 ++-- Makefile.qa | 12 ++++++------ tests/Dockerfile | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 2b0fe34c..2f66f85d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -6,10 +6,10 @@ This directory contains the continuous integration workflows for MinUI. ### Quality Assurance (`qa.yml`) -Runs on every push and pull request to `main`, `develop`, and `ci` branches. +Runs on every push and pull request to `main` and `develop` branches. **Jobs:** -- **Unit Tests** - Runs comprehensive test suite in Debian Buster ARM64 Docker container +- **Unit Tests** - Runs comprehensive test suite in Debian Buster Docker container (GCC 8.3.0) - **Static Analysis** - cppcheck on workspace/all/ (platform-independent code) - **Code Formatting** - Validates code formatting with clang-format - **Shell Script Linting** - shellcheck on all shell scripts diff --git a/Makefile.qa b/Makefile.qa index 99ce5730..398ea5e1 100644 --- a/Makefile.qa +++ b/Makefile.qa @@ -16,7 +16,7 @@ help: @echo " make clean-qa - Clean QA artifacts" @echo "" @echo "Docker targets (default):" - @echo " make docker-test - Run tests in Debian Buster ARM64 container" + @echo " make docker-test - Run tests in Debian Buster container" @echo " make docker-build - Build test Docker image" @echo " make docker-shell - Enter Docker container for debugging" @echo "" @@ -166,15 +166,15 @@ report: check-cppcheck # Docker-based testing targets DOCKER_IMAGE = minui-test -DOCKER_RUN = docker run --rm -v $(shell pwd):/minui -w /minui --platform linux/arm64 $(DOCKER_IMAGE) +DOCKER_RUN = docker run --rm -v $(shell pwd):/minui -w /minui $(DOCKER_IMAGE) docker-build: - @echo "Building test Docker image (Debian Buster ARM64)..." - docker build --platform linux/arm64 -t $(DOCKER_IMAGE) -f tests/Dockerfile . + @echo "Building test Docker image (Debian Buster)..." + docker build -t $(DOCKER_IMAGE) -f tests/Dockerfile . @echo "✓ Docker image ready" docker-test: docker-build - @echo "Running tests in Docker container (Debian Buster ARM64)..." + @echo "Running tests in Docker container (Debian Buster)..." @echo "" $(DOCKER_RUN) make -f Makefile.qa clean-tests test-native @@ -184,4 +184,4 @@ docker-lint: docker-build docker-shell: docker-build @echo "Entering Docker container shell..." - docker run --rm -it -v $(shell pwd):/minui -w /minui --platform linux/arm64 $(DOCKER_IMAGE) /bin/bash + docker run --rm -it -v $(shell pwd):/minui -w /minui $(DOCKER_IMAGE) /bin/bash diff --git a/tests/Dockerfile b/tests/Dockerfile index 87610499..49100559 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -1,5 +1,6 @@ # Lightweight Docker image for running MinUI tests -# Uses Debian Buster to match most platform toolchains +# Uses Debian Buster to match platform toolchains (GCC 8.3.0) +# Note: Uses native platform (AMD64 on CI, ARM64 on Apple Silicon) FROM debian:buster-slim ENV DEBIAN_FRONTEND=noninteractive From 9b425786454198ccebdefa880a5a5363a4bf47d4 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 14:31:06 -0800 Subject: [PATCH 3/6] Simplify actions. --- .github/workflows/README.md | 46 +++++++++++++++---------------- .github/workflows/build.yml | 54 ++---------------------------------- .github/workflows/qa.yml | 55 +++++++++---------------------------- Makefile.qa | 39 +++++++++++++++++++------- 4 files changed, 67 insertions(+), 127 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 2f66f85d..f0e7e79b 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -9,46 +9,38 @@ This directory contains the continuous integration workflows for MinUI. Runs on every push and pull request to `main` and `develop` branches. **Jobs:** -- **Unit Tests** - Runs comprehensive test suite in Debian Buster Docker container (GCC 8.3.0) -- **Static Analysis** - cppcheck on workspace/all/ (platform-independent code) -- **Code Formatting** - Validates code formatting with clang-format -- **Shell Script Linting** - shellcheck on all shell scripts +- **Lint** - Runs all linting checks (cppcheck, clang-format, shellcheck) +- **Test** - Runs comprehensive test suite in Debian Buster Docker container (GCC 8.3.0) -All QA jobs run on standard `ubuntu-latest` runners. +All QA jobs run on standard `ubuntu-latest` runners in parallel. ### Platform Builds (`build.yml`) -Validates that builds work for multiple platforms. +Validates compilation works (compile-only, no artifacts). -**Default platforms tested on every PR:** -- miyoomini (Miyoo Mini) -- trimuismart (Trimui Smart) -- rg35xxplus (Anbernic RG35XX Plus) +**Platform tested:** rg35xxplus (Anbernic RG35XX Plus) -**Workflow dispatch:** -Can manually trigger builds for specific platforms or all platforms using the "Run workflow" button in GitHub Actions. - -**Artifacts:** -Build artifacts are uploaded and retained for 7 days for testing. +**Note:** This only tests compilation (`make PLATFORM=rg35xxplus build`), not full builds with system file copying. This catches compilation errors quickly without needing the full skeleton setup. ## Running Workflows Locally ### QA Checks -You can run the same QA checks locally that run in CI: +You can run the **exact same commands** locally that run in CI: ```bash -# Run all tests (uses Docker) -make test - -# Run static analysis +# Run all linting checks (cppcheck, format-check, shellcheck) make lint -# Check code formatting -make format-check +# Run all tests (uses Docker) +make test +``` -# Lint shell scripts -make -f Makefile.qa lint-shell +Individual targets are also available if needed: +```bash +make lint-code # Just cppcheck +make format-check # Just formatting +make lint-shell # Just shellcheck ``` ### Platform Builds @@ -63,6 +55,12 @@ make PLATFORM=miyoomini cores make all ``` +## CI Strategy Summary + +| Event | Runs | Duration | Purpose | +|-------|------|----------|---------| +| **PR/Push to main/develop** | Lint + Test + Build (rg35xxplus) | ~5-7 min | Fast feedback, catch compilation errors | + ## Status Badges Add to README.md: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c90260c..026f0703 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,24 +5,11 @@ on: branches: [main, develop] pull_request: branches: [main, develop] - workflow_dispatch: - inputs: - platforms: - description: 'Platforms to build (space-separated, or "all")' - required: false - default: 'miyoomini trimuismart rg35xxplus' jobs: build: - name: Build ${{ matrix.platform }} + name: Build runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - miyoomini - - trimuismart - - rg35xxplus steps: - name: Checkout code @@ -31,40 +18,5 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build platform ${{ matrix.platform }} - run: make PLATFORM=${{ matrix.platform }} build - - - name: Copy system files - run: make PLATFORM=${{ matrix.platform }} system - - - name: Build cores - run: make PLATFORM=${{ matrix.platform }} cores - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: minui-${{ matrix.platform }}-${{ github.sha }} - path: build/ - retention-days: 7 - - build-all: - name: Build All Platforms - runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' && github.event.inputs.platforms == 'all' - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build all platforms - run: make all - - - name: Upload all artifacts - uses: actions/upload-artifact@v4 - with: - name: minui-all-platforms-${{ github.sha }} - path: releases/ - retention-days: 7 + - name: Build rg35xxplus (compile only) + run: make PLATFORM=rg35xxplus build diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index 74fedc19..a9013e43 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -7,61 +7,32 @@ on: branches: [main, develop] jobs: - test: - name: Unit Tests - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build test Docker image - run: make -f Makefile.qa docker-build - - - name: Run unit tests - run: make -f Makefile.qa docker-test - lint: - name: Static Analysis + name: Lint runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install cppcheck - run: sudo apt-get update && sudo apt-get install -y cppcheck + - name: Install linting tools + run: | + sudo apt-get update + sudo apt-get install -y cppcheck clang-format shellcheck - - name: Run static analysis on workspace/all/ - run: make -f Makefile.qa lint + - name: Run all linting checks + run: make lint - format: - name: Code Formatting - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install clang-format - run: sudo apt-get update && sudo apt-get install -y clang-format - - - name: Check code formatting - run: make -f Makefile.qa format-check - - shellcheck: - name: Shell Script Linting + test: + name: Test runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install shellcheck - run: sudo apt-get update && sudo apt-get install -y shellcheck + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Run shellcheck - run: make -f Makefile.qa lint-shell + - name: Run all tests + run: make test diff --git a/Makefile.qa b/Makefile.qa index 398ea5e1..302e7486 100644 --- a/Makefile.qa +++ b/Makefile.qa @@ -1,29 +1,32 @@ # Quality Assurance Makefile # Run static analysis and tests -.PHONY: help lint lint-full lint-shell test test-native format format-check clean-qa docker-build docker-test docker-shell +.PHONY: help lint lint-code lint-full lint-shell test test-native format format-check clean-qa docker-build docker-test docker-shell help: @echo "MinUI Quality Assurance Tools" @echo "" - @echo "Available targets:" + @echo "Main targets (use these):" @echo " make test - Run unit tests (Docker, recommended)" - @echo " make lint - Run cppcheck on workspace/all/ (serious issues only)" - @echo " make lint-full - Run cppcheck on entire workspace (verbose)" - @echo " make lint-shell - Run shellcheck on shell scripts" + @echo " make lint - Run ALL linting checks (cppcheck, format, shellcheck)" @echo " make format - Format code with clang-format (MODIFIES FILES)" + @echo "" + @echo "Individual lint targets:" + @echo " make lint-code - Run cppcheck on workspace/all/" + @echo " make lint-full - Run cppcheck on entire workspace (verbose)" @echo " make format-check - Check if code is formatted (no changes)" - @echo " make clean-qa - Clean QA artifacts" + @echo " make lint-shell - Run shellcheck on shell scripts" @echo "" - @echo "Docker targets (default):" + @echo "Docker targets:" @echo " make docker-test - Run tests in Debian Buster container" @echo " make docker-build - Build test Docker image" @echo " make docker-shell - Enter Docker container for debugging" @echo "" - @echo "Native targets (requires local tools):" + @echo "Other:" @echo " make test-native - Run tests natively (not recommended on macOS)" + @echo " make clean-qa - Clean QA artifacts" @echo "" - @echo "Installing native tools:" + @echo "Installing tools:" @echo " macOS: brew install cppcheck llvm shellcheck" @echo " Linux: sudo apt-get install cppcheck clang-format shellcheck" @@ -43,8 +46,24 @@ check-cppcheck: check-shellcheck: @which shellcheck > /dev/null || (echo "Error: shellcheck not installed. Run 'brew install shellcheck' or 'apt-get install shellcheck'" && exit 1) +# Main lint target - runs all linting checks +lint: check-cppcheck check-clang-format check-shellcheck + @echo "=================================" + @echo "Running ALL linting checks..." + @echo "=================================" + @echo "" + @$(MAKE) -f Makefile.qa lint-code + @echo "" + @$(MAKE) -f Makefile.qa format-check + @echo "" + @$(MAKE) -f Makefile.qa lint-shell + @echo "" + @echo "=================================" + @echo "✓ All linting checks passed" + @echo "=================================" + # Lint common code (most important, least platform-specific) -lint: check-cppcheck +lint-code: check-cppcheck @echo "Running cppcheck on workspace/all/ (common code)..." @echo "Checking for: NULL dereferences, memory leaks, buffer overflows, uninitialized variables" @echo "" From b0825127aa9ff75b789b2caba5081a72b4f9bca4 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 14:56:00 -0800 Subject: [PATCH 4/6] Cache toolchain for faster repeat builds. --- .github/workflows/README.md | 6 ++++-- .github/workflows/build.yml | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index f0e7e79b..d1f54769 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -18,9 +18,11 @@ All QA jobs run on standard `ubuntu-latest` runners in parallel. Validates compilation works (compile-only, no artifacts). -**Platform tested:** rg35xxplus (Anbernic RG35XX Plus) +**Platform tested:** miyoomini (Miyoo Mini) -**Note:** This only tests compilation (`make PLATFORM=rg35xxplus build`), not full builds with system file copying. This catches compilation errors quickly without needing the full skeleton setup. +**Note:** This only tests compilation (`make PLATFORM=miyoomini build`), not full builds with system file copying. This catches compilation errors quickly without needing the full skeleton setup. + +**Caching:** The toolchain directory is cached between runs. First run takes ~15-20 min (builds Docker image), subsequent runs take ~2-3 min (uses cache). ## Running Workflows Locally diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 026f0703..183c7380 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,8 +15,14 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Cache toolchain + uses: actions/cache@v4 + with: + path: toolchains/miyoomini-toolchain + key: miyoomini-toolchain-${{ hashFiles('makefile.toolchain') }} + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Build rg35xxplus (compile only) - run: make PLATFORM=rg35xxplus build + - name: Build miyoomini (compile only) + run: make PLATFORM=miyoomini build From 622ccda0c510c0ba32d7f2a20691c28398bbfd00 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 15:34:21 -0800 Subject: [PATCH 5/6] Review fixes. --- Makefile.qa | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile.qa b/Makefile.qa index 302e7486..05d79a04 100644 --- a/Makefile.qa +++ b/Makefile.qa @@ -8,7 +8,7 @@ help: @echo "" @echo "Main targets (use these):" @echo " make test - Run unit tests (Docker, recommended)" - @echo " make lint - Run ALL linting checks (cppcheck, format, shellcheck)" + @echo " make lint - Run ALL linting checks (cppcheck, format-check, shellcheck)" @echo " make format - Format code with clang-format (MODIFIES FILES)" @echo "" @echo "Individual lint targets:" @@ -48,19 +48,19 @@ check-shellcheck: # Main lint target - runs all linting checks lint: check-cppcheck check-clang-format check-shellcheck - @echo "=================================" - @echo "Running ALL linting checks..." - @echo "=================================" - @echo "" - @$(MAKE) -f Makefile.qa lint-code - @echo "" - @$(MAKE) -f Makefile.qa format-check - @echo "" - @$(MAKE) -f Makefile.qa lint-shell - @echo "" - @echo "=================================" - @echo "✓ All linting checks passed" - @echo "=================================" + @echo "=================================" && \ + echo "Running ALL linting checks..." && \ + echo "=================================" && \ + echo "" && \ + $(MAKE) -f Makefile.qa lint-code && \ + echo "" && \ + $(MAKE) -f Makefile.qa format-check && \ + echo "" && \ + $(MAKE) -f Makefile.qa lint-shell && \ + echo "" && \ + echo "=================================" && \ + echo "✓ All linting checks passed" && \ + echo "=================================" # Lint common code (most important, least platform-specific) lint-code: check-cppcheck From 650c1cabf086372b00a1a87b79dc68c5a99c83f8 Mon Sep 17 00:00:00 2001 From: Nick Chapman Date: Sat, 8 Nov 2025 15:37:06 -0800 Subject: [PATCH 6/6] Remove build cache for now. --- .github/workflows/README.md | 2 +- .github/workflows/build.yml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index d1f54769..c8436c0a 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -22,7 +22,7 @@ Validates compilation works (compile-only, no artifacts). **Note:** This only tests compilation (`make PLATFORM=miyoomini build`), not full builds with system file copying. This catches compilation errors quickly without needing the full skeleton setup. -**Caching:** The toolchain directory is cached between runs. First run takes ~15-20 min (builds Docker image), subsequent runs take ~2-3 min (uses cache). +**Build time:** ~15-20 min (clones toolchain, builds Docker image, compiles). ## Running Workflows Locally diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 183c7380..1f11149c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,12 +15,6 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Cache toolchain - uses: actions/cache@v4 - with: - path: toolchains/miyoomini-toolchain - key: miyoomini-toolchain-${{ hashFiles('makefile.toolchain') }} - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3