This commit is contained in:
hathach
2026-02-12 11:30:40 +07:00
parent 39bc5cd933
commit c59447faa8
6 changed files with 11 additions and 156 deletions

View File

@ -23,7 +23,6 @@ runs:
wget $NINJA_URL -O ninja-linux.zip
unzip ninja-linux.zip -d ninja-bin
pip install membrowse
#echo >> $GITHUB_PATH "$HOME/.local/bin"
echo >> $GITHUB_PATH "${{ github.workspace }}/ninja-bin"
shell: bash

View File

@ -336,53 +336,3 @@ jobs:
- name: Test on actual hardware (hardware in the loop)
run: python3 test/hil/hil_test.py hfp.json
# ---------------------------------------
# Membrowse Memory Analysis
# Push: always runs (uses identical for doc-only to maintain commit chain)
# PR: only runs if code changed (doc-only PRs skip entirely)
# ---------------------------------------
# membrowse:
# needs: [check-paths, cmake]
# if: |
# always() && !cancelled() && (
# github.event_name == 'push' ||
# github.event_name == 'release' ||
# github.event_name == 'workflow_dispatch' ||
# (github.event_name == 'pull_request' && needs.check-paths.outputs.code_changed == 'true')
# )
# permissions:
# contents: read
# actions: read
# uses: ./.github/workflows/membrowse-report.yml
# with:
# code_changed: ${{ needs.check-paths.outputs.code_changed == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
# secrets: inherit
#
# membrowse-comment:
# needs: membrowse
# # skip membrowse comment since it is too verbal
# if: false && github.event_name == 'pull_request'
# runs-on: ubuntu-latest
# permissions:
# contents: read
# actions: read
# steps:
# - name: Checkout repository
# uses: actions/checkout@v6
#
# - name: Download report artifacts
# id: download
# uses: actions/download-artifact@v5
# with:
# pattern: membrowse-report-*
# path: reports
# merge-multiple: true
# continue-on-error: true
#
# - name: Upload Membrowse Comment Artifact
# if: steps.download.outcome == 'success'
# uses: actions/upload-artifact@v5
# with:
# name: membrowse-comment
# path: reports/

View File

@ -67,7 +67,7 @@ jobs:
IAR_LMS_BEARER_TOKEN: ${{ secrets.IAR_LMS_BEARER_TOKEN }}
run: |
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
docker run --rm -e MEMBROWSE_API_KEY="$MEMBROWSE_API_KEY" -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py -T all ${{ matrix.arg }}
docker run --rm -e MEMBROWSE_API_KEY="$MEMBROWSE_API_KEY" -v $PWD:/project -w /project espressif/idf:tinyusb python tools/build.py --target all ${{ matrix.arg }}
else
BUILD_PY_ARGS="-s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ inputs.build-options }}"
python tools/build.py $BUILD_PY_ARGS --target all ${{ matrix.arg }}
@ -90,14 +90,14 @@ jobs:
shell: bash
- name: Upload Artifacts for Metrics
if: ${{ inputs.upload-metrics }}
if: inputs.upload-metrics == true && inputs.code-changed == true
uses: actions/upload-artifact@v5
with:
name: metrics-${{ matrix.arg }}
path: cmake-build/cmake-build-*/metrics.json
- name: Upload Artifacts for Hardware Testing
if: ${{ inputs.upload-artifacts }}
if: inputs.upload-artifacts == true && inputs.code-changed == true
uses: actions/upload-artifact@v5
with:
name: binaries-${{ matrix.arg }}

View File

@ -1,100 +0,0 @@
name: Membrowse Memory Report
on:
workflow_call:
inputs:
code_changed:
description: 'Whether code paths changed (true) or doc-only (false)'
type: boolean
required: true
permissions:
contents: read
actions: read
jobs:
load-targets:
runs-on: ubuntu-latest
outputs:
targets: ${{ steps.load.outputs.targets }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Load target matrix
id: load
run: echo "targets=$(jq -c '.targets' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT
analyze:
needs: [load-targets]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.load-targets.outputs.targets) }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
# Download artifacts when code changed (build artifacts available)
- name: Download build artifacts
if: inputs.code_changed
id: download
uses: actions/download-artifact@v5
with:
pattern: binaries-*
path: cmake-build
merge-multiple: true
continue-on-error: true
- name: Restore linker scripts
if: inputs.code_changed
run: cp -r cmake-build/hw . 2>/dev/null || true
- name: Check if ELF exists
id: check-elf
run: |
if [ -f "cmake-build/cmake-build-${{ matrix.board }}/device/${{ matrix.example }}/${{ matrix.example }}.elf" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
# Run with actual ELF analysis when build artifacts available
- name: Run Membrowse Analysis
if: steps.check-elf.outputs.exists == 'true'
id: membrowse
continue-on-error: true
uses: membrowse/membrowse-action@v1
with:
target_name: ${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }}
elf: cmake-build/cmake-build-${{ matrix.board }}/device/${{ matrix.example }}/${{ matrix.example }}.elf
ld: ${{ matrix.ld }}
linker_vars: ${{ matrix.linker_vars || '' }}
api_key: ${{ secrets.MEMBROWSE_API_KEY }}
api_url: ${{ vars.MEMBROWSE_API_URL }}
verbose: INFO
# Run with identical=true when no ELF (doc-only push)
# Preserves the chain of commits in membrowse tracking
- name: Run Membrowse Identical Report
if: steps.check-elf.outputs.exists == 'false'
id: membrowse-identical
continue-on-error: true
uses: membrowse/membrowse-action@v1
with:
target_name: ${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }}
identical: true
api_key: ${{ secrets.MEMBROWSE_API_KEY }}
api_url: ${{ vars.MEMBROWSE_API_URL }}
verbose: INFO
- name: Upload report artifact
if: steps.membrowse.outcome == 'success' || steps.membrowse-identical.outcome == 'success'
uses: actions/upload-artifact@v5
with:
name: membrowse-report-${{ matrix.port }}-${{ matrix.board }}-${{ matrix.example }}
path: ${{ steps.membrowse.outputs.report_path || steps.membrowse-identical.outputs.report_path }}