mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-07-13 19:02:10 +08:00
agnos rootfs statistics in CI (#291)
* agnos rootfs statistics in CI * rebuild * wip * minimal stats * agnos stats in PR comment * just the folders * just stats * raw image is now just image * fix printing stats when no [upload] * this is nicer [upload]
This commit is contained in:
@@ -58,6 +58,15 @@ jobs:
|
||||
- name: Build system
|
||||
run: ./build_system.sh
|
||||
|
||||
- name: Statistics
|
||||
id: stats
|
||||
run: |
|
||||
{
|
||||
echo 'stats_summary<<EOF'
|
||||
scripts/analyze-agnos-rootfs.sh
|
||||
echo EOF
|
||||
} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Package and OTA push
|
||||
if: "contains(env.LAST_COMMIT_MESSAGE, '[upload]')"
|
||||
env:
|
||||
@@ -65,11 +74,12 @@ jobs:
|
||||
run: |
|
||||
scripts/package_ota.py
|
||||
|
||||
- name: Save PR number and VERSION
|
||||
- name: Save PR number, VERSION and stats
|
||||
if: "contains(env.LAST_COMMIT_MESSAGE, '[upload]')"
|
||||
run: |
|
||||
echo ${{ github.event.number }} > output/ota/PR
|
||||
cp VERSION output/ota
|
||||
echo "${{ steps.stats.outputs.stats_summary }}" > output/ota/agnos_stats.txt
|
||||
|
||||
- name: Upload artifacts
|
||||
if: "contains(env.LAST_COMMIT_MESSAGE, '[upload]')"
|
||||
|
||||
@@ -59,7 +59,6 @@ jobs:
|
||||
git push origin agnos-builder/pr-${{ env.PR_NUMBER }} --force
|
||||
|
||||
- name: List .xz files with links
|
||||
id: list_xz
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
{
|
||||
@@ -70,6 +69,15 @@ jobs:
|
||||
echo EOF
|
||||
} >> $GITHUB_ENV
|
||||
|
||||
- name: Read agnos_stats.txt
|
||||
working-directory: ${{ github.workspace }}/ci-artifacts
|
||||
run: |
|
||||
{
|
||||
echo 'AGNOS_STATS<<EOF'
|
||||
cat agnos_stats.txt
|
||||
echo EOF
|
||||
} >> $GITHUB_ENV
|
||||
|
||||
- name: Comment on PR
|
||||
uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
|
||||
with:
|
||||
@@ -82,6 +90,11 @@ jobs:
|
||||
|
||||
### Images:
|
||||
${{ env.XZ_FILES }}
|
||||
|
||||
### Stats:
|
||||
```
|
||||
${{ env.AGNOS_STATS }}
|
||||
```
|
||||
pr_number: ${{ env.PR_NUMBER }}
|
||||
comment_tag: run_id
|
||||
mode: recreate
|
||||
|
||||
Reference in New Issue
Block a user