Add firmware artifacts, memory summary, and Doxygen gh-pages deploy
Some checks failed
CI / Build firmware (push) Failing after 38s
CI / Check formatting (push) Successful in 12s
CI / Static analysis (push) Successful in 11s
CI / Build documentation (push) Failing after 13s

CMakeLists.txt: generate firmware.map via -Wl,-Map.

CI build job:
- Writes per-section size table to the Gitea job summary
  (visible in the Actions UI after each run).
- Uploads firmware.hex and firmware.map as a downloadable artifact
  named firmware-<sha>.

CI docs job:
- On push to main, force-pushes docs/html/ as an orphan commit to
  the gh-pages branch.  Gitea Pages must be enabled in site admin
  for the HTML to be served; the branch is always available via the
  repo file browser regardless.
This commit is contained in:
Krzysztof Cieślik
2026-05-21 23:20:55 +02:00
parent 7d47af12d8
commit 9c0e280fab
2 changed files with 37 additions and 2 deletions

View File

@@ -25,8 +25,26 @@ jobs:
- name: Compile firmware
run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel . && ninja -C build
- name: Print size
run: arm-none-eabi-size build/firmware
- name: Memory summary
run: |
echo '## Memory usage' >> "$GITHUB_STEP_SUMMARY"
echo '' >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
arm-none-eabi-size -A build/firmware \
| grep -E '^\.(text|data|bss|rodata|ARM)' \
>> "$GITHUB_STEP_SUMMARY"
echo '' >> "$GITHUB_STEP_SUMMARY"
arm-none-eabi-size build/firmware | tail -1 >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
- name: Upload firmware artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-${{ github.sha }}
path: |
build/firmware.hex
build/firmware.map
if-no-files-found: error
format:
name: Check formatting
@@ -80,3 +98,19 @@ jobs:
run: |
doxygen Doxyfile 2>&1 | tee /tmp/doxy.log
! grep -q 'warning:' /tmp/doxy.log
- name: Deploy to gh-pages
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd docs/html
git init -b gh-pages
git config user.name "ci"
git config user.email "ci@localhost"
git add -A
git commit -m "docs: ${GITHUB_SHA}"
SERVER="${GITHUB_SERVER_URL#https://}"
git push --force \
"https://x-token:${GITHUB_TOKEN}@${SERVER}/${GITHUB_REPOSITORY}.git" \
HEAD:gh-pages