ci: add unified validation gate

This commit is contained in:
cjiio committed 2026-08-25 19:31:59 +08:00
1 parent b327d236eb
commit c57982e032
20 files changed
+566 -17

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
## Summary
<!-- What problem does this PR solve, and what user-visible behavior changes? -->
## Scope and compatibility
- Affected board/revision:
- Affected subsystem:
- Wiring or pin-map impact: None
- Flash, partition, or persistent-data impact: None
- Backward-compatibility impact: None
## Verification
| Check | Result | Evidence or notes |
| --- | --- | --- |
| Build | PASS / FAIL / NOT RUN | |
| Host tests | PASS / FAIL / NOT RUN | |
| Device tests | PASS / FAIL / NOT RUN | |
| Unverified | — | List every remaining board, instrument, or user check |
Commands run:
```text
./tools/validate.sh
```
## Device evidence
<!-- Record board revision, observed behavior, logs, measurements, and display photos/screenshots where applicable. Never include credentials or device QR secrets. -->
## Checklist
- [ ] I reviewed the complete diff and excluded unrelated/generated files.
- [ ] I ran the relevant validation command or explained why it was not run.
- [ ] I separated build, host-test, and device-test results.
- [ ] I updated authoritative documentation for changed hardware facts or durable behavior.
- [ ] I updated `CHANGELOG.md` if this changes user-visible behavior, compatibility, or release workflow.
- [ ] I removed credentials, private device links, personal data, and unsanitized logs.
+1 -3
View File
@@ -38,9 +38,7 @@ jobs:
extra_docker_args: >-
-e CCACHE_DIR=/app/${{ github.repository }}/.ccache
-e IDF_CCACHE_ENABLE=1
command: >-
idf.py -D SDKCONFIG_DEFAULTS=sdkconfig.defaults build &&
idf.py merge-bin -o "$PWD/build/FoloToy-AI-Passport-full.bin"
command: ./tools/validate.sh --firmware
- name: Set artifact name
id: artifact_name
+62
View File
@@ -0,0 +1,62 @@
name: Pull request checks
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
static:
name: Repository and host checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Install verified actionlint
run: |
actionlint_bin="$(./tools/install-actionlint.sh "$RUNNER_TEMP/actionlint")"
echo "ACTIONLINT_BIN=${actionlint_bin}" >> "$GITHUB_ENV"
- name: Validate repository and run host tests
run: ./tools/validate.sh --static
firmware:
name: ESP-IDF 5.5.3 firmware
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- name: Restore ccache
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5
with:
path: .ccache
key: ci-ccache-${{ github.sha }}
restore-keys: |
ci-ccache-
- name: Build and verify merged firmware
uses: espressif/esp-idf-ci-action@9d38657f3d789ca759b2b37aaf5ceffbc42c4f0d # v1
with:
esp_idf_version: v5.5.3
target: esp32c3
extra_docker_args: >-
-e CCACHE_DIR=/app/${{ github.repository }}/.ccache
-e IDF_CCACHE_ENABLE=1
command: ./tools/validate.sh --firmware
- name: Upload verified firmware
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: firmware-${{ github.run_id }}
path: build/FoloToy-AI-Passport-full.bin
if-no-files-found: error
retention-days: 7
Loaded 3 of 20 files, more files were not shown because too many files have changed in this diff. Show more