11name : Membrowse Memory Report
22
3- # Runs nightly instead of per-PR - the report is for trend tracking, not
4- # gating individual PRs, and the build matrix is too heavy to run on every
5- # push. Use workflow_dispatch to trigger an ad-hoc run.
6-
73on :
8- schedule :
9- - cron : ' 0 4 * * *' # daily at 04:00 UTC
4+ pull_request :
5+ types : [opened, synchronize, reopened, ready_for_review]
6+ push :
7+ branches : [master]
108 workflow_dispatch :
119
1210concurrency :
13- group : ${{ github.workflow }}
14- cancel-in-progress : false
11+ group : ${{ github.workflow }}-${{ github.ref }}
12+ cancel-in-progress : ${{ github.ref != 'refs/heads/master' }}
1513
1614jobs :
1715 load-targets :
16+ if : github.event_name != 'pull_request' || github.event.pull_request.draft == false
1817 runs-on : ubuntu-24.04
1918 timeout-minutes : 10
2019 outputs :
2726 id : set-matrix
2827 run : echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT
2928
29+ check-changes :
30+ if : github.event_name != 'pull_request' || github.event.pull_request.draft == false
31+ runs-on : ubuntu-24.04
32+ timeout-minutes : 5
33+ outputs :
34+ needs_build : ${{ steps.filter.outputs.code == 'true' || github.event_name == 'workflow_dispatch' }}
35+ steps :
36+ - name : Checkout repository
37+ uses : actions/checkout@v5
38+
39+ - name : Detect binary-affecting changes
40+ id : filter
41+ if : github.event_name == 'pull_request' || github.event_name == 'push'
42+ uses : dorny/paths-filter@v4
43+ with :
44+ predicate-quantifier : every
45+ filters : |
46+ code:
47+ - '!**.md'
48+ - '!**/README*'
49+ - '!doc/**'
50+ - '!AUTHORS'
51+ - '!COPYING*'
52+ - '!LICENSE*'
53+ - '!LICENSING'
54+ - '!INSTALL'
55+ - '!ChangeLog*'
56+ - '!SCRIPTS-LIST'
57+ - '!.gitignore'
58+ - '!.editorconfig'
59+ - '!.codespellexcludelines'
60+ - '!.cyignore'
61+ - '!.wolfssl_known_macro_extras'
62+ - '!.github/ISSUE_TEMPLATE/**'
63+ - '!.github/PULL_REQUEST_TEMPLATE.md'
64+
3065 analyze :
31- needs : load-targets
66+ needs : [load-targets, check-changes]
67+ if : github.event_name != 'pull_request' || needs.check-changes.outputs.needs_build == 'true'
3268 runs-on : ubuntu-24.04
3369 timeout-minutes : 10
3470 strategy :
@@ -40,25 +76,29 @@ jobs:
4076 - name : Checkout repository
4177 uses : actions/checkout@v5
4278 with :
43- fetch-depth : 0
44- submodules : recursive
79+ fetch-depth : 2
80+ submodules : ${{ needs.check-changes.outputs.needs_build == 'true' && ' recursive' || 'false' }}
4581
4682 - name : Install packages
83+ if : needs.check-changes.outputs.needs_build == 'true'
4784 uses : ./.github/actions/install-apt-deps
4885 with :
4986 packages : ${{ matrix.apt_packages }}
5087
5188 - name : Build firmware
89+ if : needs.check-changes.outputs.needs_build == 'true'
5290 run : ${{ matrix.build_cmd }}
5391
5492 - name : Run Membrowse PR Action
5593 id : analyze
5694 uses : membrowse/membrowse-action@v1
5795 with :
5896 target_name : ${{ matrix.target_name }}
59- elf : ${{ matrix.elf }}
60- ld : ${{ matrix.ld }}
97+ elf : ${{ needs.check-changes.outputs.needs_build == 'true' && matrix.elf || '' }}
98+ ld : ${{ needs.check-changes.outputs.needs_build == 'true' && matrix.ld || '' }}
99+ map_file : ${{ needs.check-changes.outputs.needs_build == 'true' && matrix.map_file || '' }}
61100 linker_vars : ${{ matrix.linker_vars }}
62101 api_key : ${{ secrets.MEMBROWSE_API_KEY }}
63102 api_url : ${{ vars.MEMBROWSE_API_URL }}
103+ identical : ${{ needs.check-changes.outputs.needs_build != 'true' }}
64104 verbose : INFO
0 commit comments